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

SYSMIS values in custom tables

241 views
Skip to first unread message

Andreas Jaeger

unread,
Oct 26, 2011, 1:50:06 PM10/26/11
to
Hello all,

is there a way to include $sysmis values in custom tables analysis?
What I'm looking for is the second table in the following syntax, but
without tampering with the original data values, and without creating
new temporary variables.

Thanks, Andreas

DATA LIST FREE (";") / gender(F1.0) agecat(F1.0) color(F1.0).
BEGIN DATA
1;1;1
2;2;3
1;;1
2;;3
1;2;1
2;;3
1;1;1
END DATA.

VALUE LABELS gender 1 'male' 2 'female'.
VALUE LABELS agecat 1 'young' 2 'old'.
VALUE LABELS color 1 'red' 2 'green' 3 'blue'.

CTABLES
/VLABELS VARIABLES=ALL DISPLAY=NONE
/TABLE gender > agecat [COUNT] BY color
/CATEGORIES VARIABLES=gender agecat color [OTHERNM].

VALUE LABELS agecat 1 'young' 2 'old' -1 'unknown'.
RECODE agecat (SYSMIS=-1).
CTABLES
/VLABELS VARIABLES=ALL DISPLAY=NONE
/TABLE gender > agecat [COUNT] BY color
/CATEGORIES VARIABLES=gender agecat color [OTHERNM].

--
Andreas Jaeger
MMF GmbH, Herdecke, Germany

Bruce Weaver

unread,
Oct 26, 2011, 5:20:24 PM10/26/11
to
Hi Andreas. Have you tried TEMPORARY? E.g.,

* Original table.
CTABLES
/VLABELS VARIABLES=ALL DISPLAY=NONE
/TABLE gender > agecat [COUNT] BY color
/CATEGORIES VARIABLES=gender agecat color [OTHERNM].

* Desired table .
TEMPORARY.
ADD VALUE LABELS agecat -1 'unknown'.
RECODE agecat (SYSMIS=-1).
CTABLES
/VLABELS VARIABLES=ALL DISPLAY=NONE
/TABLE gender > agecat [COUNT] BY color
/CATEGORIES VARIABLES=gender agecat color [OTHERNM].

* Back to the first table, with original variables intact.
CTABLES
/VLABELS VARIABLES=ALL DISPLAY=NONE
/TABLE gender > agecat [COUNT] BY color
/CATEGORIES VARIABLES=gender agecat color [OTHERNM].


HTH.

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

Jon Peck

unread,
Oct 26, 2011, 7:30:31 PM10/26/11
to
The temporary command will evade the sysmis screen, but it suggests that sysmis may not be the best coding here. Sysmis typically arises from things like division by zero. If you are really representing a NA condition or something similar, using a user missing code might be better. In that case, CTABLES will let you include it via the CATEGORIES subcommand.

Regards,
Jon Peck

Art Kendall

unread,
Oct 27, 2011, 7:31:12 AM10/27/11
to
AMEN!

try SET BLANKS = -1.
at the beginning of your syntax.

Art Kendall
Social Research Consultants
0 new messages