SPSS 18 fails to spot varname in crosstabs

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

SPSS 18 fails to spot varname in crosstabs

John F Hall

Playing with some else's *.sav file (from SPSS 11) and this happened:

cro var15a by q6 .

Warnings

Text: by Command: cro

Unrecognized text was found where a variable list was expected.

Execution of this command stops.

A variable on the CROSSTABS command is missing a range specification. Perhaps a range is present for some of the variables and not others. Ranges must be provided for all of the variables (integer mode) or none of the variables (general mode).Text found:

The CROSSTABS command does not specify any tables to be produced. The TABLES subcommand is either missing or invalid.

So I tried it the other way round, et voilà!

cro q6 by var15a .

Q6 * var15a Crosstabulation

Count

 

var15a

Total

No

Yes

Q6

Neither did

85

0

85

Only mother

0

37

37

Only father

0

107

107

Both did

0

102

102

Total

85

246

331

 

Reply | Threaded
Open this post in threaded view
|

Re: SPSS 18 fails to spot varname in crosstabs

Jon K Peck
You are running into syntax ambiguity that occurs with some older commands.  The CROSSTABS syntax chart shows, in parts,
CROSSTABS [TABLES=]varlist BY varlist [BY...] [/varlist...]

Integer mode :

CROSSTABS VARIABLES=varlist(min,max) [varlist...]

/TABLES=varlist BY varlist [BY...] [/varlist...]

Since the VARIABLES subcommand for integer mode doesn't require a slash and keyword abbreviation is allowed, "var" is being interpreted as a keyword.  If you write the full syntax as in TABLES=var15a by q6, you should be fine.



Jon Peck
Senior Software Engineer, IBM
[hidden email]
312-651-3435




From:        John F Hall <[hidden email]>
To:        [hidden email]
Date:        11/12/2010 07:53 AM
Subject:        [SPSSX-L] SPSS 18 fails to spot varname in crosstabs
Sent by:        "SPSSX(r) Discussion" <[hidden email]>





Playing with some else's *.sav file (from SPSS 11) and this happened:

cro var15a by q6 .

Warnings
Text: by Command: cro

Unrecognized text was found where a variable list was expected.

Execution of this command stops.

A variable on the CROSSTABS command is missing a range specification. Perhaps a range is present for some of the variables and not others. Ranges must be provided for all of the variables (integer mode) or none of the variables (general mode).Text found:
The CROSSTABS command does not specify any tables to be produced. The TABLES subcommand is either missing or invalid.

So I tried it the other way round, et voilà!

cro q6 by var15a .

Q6 * var15a Crosstabulation
Count
 
var15a
Total
No
Yes
Q6 Neither did
85
0
85
Only mother
0
37
37
Only father
0
107
107
Both did
0
102
102
Total
85
246
331

 

Reply | Threaded
Open this post in threaded view
|

Re: SPSS 18 fails to spot varname in crosstabs

John F Hall

I thought integer mode was abolished years ago, and who would have thought of CROSSTABS as an older command?  OK, it's almost the oldest.
 
The same thing happens with the full CROSSTABS command:
 
crosstabs var15a by  q6 .
 
. . . but it works with:
 
crosstabs tab var15a by  q6 . 
 
And here's me telling everyone syntax is quicker and simpler than GUI, especially in lower case with abbreviated syntax.  So much for "improvements" and new releases!
 
Can someone please explain why it works with:
 
cro q6 by var15a .
 
I think you need a better syntax parser.  SPSS 21 ????
 
----- Original Message -----
Sent: Friday, November 12, 2010 3:59 PM
Subject: Re: SPSS 18 fails to spot varname in crosstabs

You are running into syntax ambiguity that occurs with some older commands.  The CROSSTABS syntax chart shows, in parts,
CROSSTABS [TABLES=]varlist BY varlist [BY...] [/varlist...]

Integer mode :

CROSSTABS VARIABLES=varlist(min,max) [varlist...]

/TABLES=varlist BY varlist [BY...] [/varlist...]

Since the VARIABLES subcommand for integer mode doesn't require a slash and keyword abbreviation is allowed, "var" is being interpreted as a keyword.  If you write the full syntax as in TABLES=var15a by q6, you should be fine.



Jon Peck
Senior Software Engineer, IBM
[hidden email]
312-651-3435




From:        John F Hall <[hidden email]>
To:        [hidden email]
Date:        11/12/2010 07:53 AM
Subject:        [SPSSX-L] SPSS 18 fails to spot varname in crosstabs
Sent by:        "SPSSX(r) Discussion" <[hidden email]>





Playing with some else's *.sav file (from SPSS 11) and this happened:

cro var15a by q6 .

Warnings
Text: by Command: cro

Unrecognized text was found where a variable list was expected.

Execution of this command stops.

A variable on the CROSSTABS command is missing a range specification. Perhaps a range is present for some of the variables and not others. Ranges must be provided for all of the variables (integer mode) or none of the variables (general mode).Text found:
The CROSSTABS command does not specify any tables to be produced. The TABLES subcommand is either missing or invalid.

So I tried it the other way round, et voilà!

cro q6 by var15a .

Q6 * var15a Crosstabulation
Count
 
var15a
Total
No
Yes
Q6 Neither did
85
0
85
Only mother
0
37
37
Only father
0
107
107
Both did
0
102
102
Total
85
246
331

Reply | Threaded
Open this post in threaded view
|

Re: SPSS 18 fails to spot varname in crosstabs

Art Kendall
I have suggested this before, but I would like to see it implemented.

It certainly saves typing that SPSS allows "abbreviation to uniqueness".� However it would be useful if there were an icon to expand all abbreviations to what SPSS "thinks" the user is saying.� This would enhance the readability of the syntax thereby facilitating communication to others.

Art Kendall
Social Research Consultants



On 11/12/2010 10:23 AM, John F Hall wrote:
I thought integer mode was abolished years ago, and who would have thought of CROSSTABS as an older command?� OK, it's almost the oldest.
The same thing happens with the full CROSSTABS command:
crosstabs var15a by� q6 .
. . . but it works with:
crosstabs tab var15a by� q6 .
And here's me telling everyone syntax is� quicker and simpler than GUI, especially in lower case with abbreviated syntax.� So much for "improvements" and new releases!
Can someone please explain why it works with:
cro q6 by var15a .
I think you need a better syntax parser.� SPSS 21 ????
----- Original Message -----
Sent: Friday, November 12, 2010 3:59 PM
Subject: Re: SPSS 18 fails to spot varname in crosstabs

You are running into syntax ambiguity that occurs with some older commands. � The CROSSTABS syntax chart shows, in parts,
CROSSTABS [TABLES=]varlist BY varlist [BY...] [/varlist...]

Integer mode :

CROSSTABS VARIABLES=varlist(min,max) [varlist...]

/TABLES=varlist BY varlist [BY...] [/varlist...]

Since the VARIABLES subcommand for integer mode doesn't require a slash and keyword abbreviation is allowed, "var" is being interpreted as a keyword. � If you write the full syntax as in TABLES=var15a by q6, you should be fine.



Jon Peck
Senior Software Engineer, IBM
[hidden email]
312-651-3435




From: � � � � John F Hall [hidden email]
To: � � � � [hidden email]
Date: � � � � 11/12/2010 07:53 AM
Subject: � � � � [SPSSX-L] SPSS 18 fails to spot varname in crosstabs
Sent by: � � � � "SPSSX(r) Discussion" [hidden email]





Playing with some else's *.sav file (from SPSS 11) and this happened:

cro var15a by q6 .

Warnings
Text: by Command: cro

Unrecognized text was found where a variable list was expected.

Execution of this command stops.

A variable on the CROSSTABS command is missing a range specification. Perhaps a range is present for some of the variables and not others. Ranges must be provided for all of the variables (integer mode) or none of the variables (general mode).Text found:
The CROSSTABS command does not specify any tables to be produced. The TABLES subcommand is either missing or invalid.

So I tried it the other way round, et voil� !

cro q6 by var15a .

Q6 * var15a Crosstabulation
Count
 
var15a
Total
No
Yes
Q6 Neither did
85
0
85
Only mother
0
37
37
Only father
0
107
107
Both did
0
102
102
Total
85
246
331

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Art Kendall
Social Research Consultants