SYSMIS values in custom tables

Discussion in 'SPSS' started by Andreas Jaeger, Oct 26, 2011.

  1. 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, Oct 26, 2011
    #1
    1. Advertisements

  2. Andreas Jaeger

    Bruce Weaver Guest

    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, Oct 26, 2011
    #2
    1. Advertisements

  3. Andreas Jaeger

    Jon Peck Guest

    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
     
    Jon Peck, Oct 27, 2011
    #3
  4. Andreas Jaeger

    Art Kendall Guest

    AMEN!

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

    Art Kendall
    Social Research Consultants
     
    Art Kendall, Oct 27, 2011
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.