SPSS 18 fails to spot varname in crosstabs

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

SPSS 18 fails to spot varname in crosstabs

John F Hall

Jon
 
You mean that all your bells and whistles can't pick up a character other than a space or "i" after "var" or that anything other than "tab" must be the row variable?
 
John
 
----- Original Message -----
Sent: Friday, November 12, 2010 5:17 PM
Subject: Re: [SPSSX-L] SPSS 18 fails to spot varname in crosstabs

We try not to take things away in order to preserve compatibility.

The command works with cro q6 by var15a because q6 doesn't match the (abbreviation for) VARIABLES while var15a does.


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




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




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 ????
 
John Hall
[hidden email]
http://surveyresearch.weebly.com
----- Original Message -----
From: [hidden email]
To: [hidden email]
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