Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CTABLES & SPLIT FILES

5 views
Skip to first unread message

cuttance

unread,
Feb 2, 2010, 4:47:33 AM2/2/10
to cutt...@radii.org

I recently purchased CTABLES for v18 SPSS Statistics, only to find
that it does not allow the use of the standard "SPLIT FILES BY
variable#".

My survey data contains several thousand observations across 300+
groups.

I want to produce a Table for Each Group that lists the Variables down
the left-side and has the category labels across the top (all
variables have the same set of response categories).

For most procedures, this is run by:

SORT CASES BY VAR#1.

SPLIT FILE BY VAR#1.

CTABLES
/VLABELS VARIABLES=R1_1 R2_1 R3_1 R4_1
DISPLAY=LABEL
/TABLE (R1_1 [COUNT F40.0, ROWPCT.COUNT PCT40.0]
+ R2_1 [COUNT F40.0, ROWPCT.COUNT PCT40.0]
+ R3_1 [COUNT F40.0, ROWPCT.COUNT PCT40.0]
+ R4_1 [COUNT F40.0, ROWPCT.COUNT PCT40.0]
BY VAR#1 •••••
The BY VAR#1 would not be used if SPLIT FILES worked.
/SLABELS POSITION=ROW VISIBLE=YES
/CLABELS ROWLABELS=OPPOSITE
/CATEGORIES VARIABLES=YEAR R1_1 R2_1 R3_1 R4_1 ORDER=A KEY=LABEL
MISSING=EXCLUDE EMPTY=EXCLUDE.

••• But SPLIT FILES BY VAR#1. is not supported.

I have received a suggestion that this be set up as a Python program —
but, unfortunately that is not feasible on the machine I am using at
present.

Also, setting up TEMPORARY SELECT IF statements for each Group lacks
elegance and is very inefficient.

Suggestions please.

Bruce Weaver

unread,
Feb 2, 2010, 7:21:40 AM2/2/10
to


What about TEMP SELECT IF inside a macro that loops through the values
of the variable you want to split on?

--
Bruce Weaver
bwe...@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/Home
"When all else fails, RTFM."

Bruce Weaver

unread,
Feb 2, 2010, 12:05:26 PM2/2/10
to
On Feb 2, 4:47 am, cuttance <cutta...@radii.org> wrote:

For the benefit of those who don't read the SPSS mailing list, someone
pointed out that split file doesn't work with CTABLES when the default
setting of "LAYERED BY" is used. The following help file info
confirms this.

• CTABLES ignores SPLIT FILE requests if layered splits (compare
groups in the graphical user interface) are requested. You can compare
groups by using the split variables at the highest nesting level for
row variables. See the TABLE subcommand for nesting variables.

0 new messages