I seem to be having some weirdness with testing values as missing; i.e.,
they're not being recognized as such. So, for example, running the following sample COMPUTE Test=$SYSMIS. IF (Test EQ $SYSMIS) Counter=1 . EXECUTE . gives me two variables, Test and Counter, with both set to missing on all cases. I've been using SPSS since the late 80s and I don't think I've ever come across anything like this. Did I make a mistake so obvious that I can't see it? ===================== 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 |
try:
COMPUTE Test=$SYSMIS. IF (sysmis(Test)) Counter=1 . EXECUTE . freq vars=test counter. bozena ----- Original Message ----- From: "Mike Donatello" <[hidden email]> To: [hidden email] Sent: Monday, January 24, 2011 11:00:45 AM GMT -08:00 US/Canada Pacific Subject: Trouble with system-missing values I seem to be having some weirdness with testing values as missing; i.e., they're not being recognized as such. So, for example, running the following sample COMPUTE Test=$SYSMIS. IF (Test EQ $SYSMIS) Counter=1 . EXECUTE . gives me two variables, Test and Counter, with both set to missing on all cases. I've been using SPSS since the late 80s and I don't think I've ever come across anything like this. Did I make a mistake so obvious that I can't see it? ===================== 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 ===================== 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 |
In reply to this post by Mike Donatello
Dear Mike
I suspect that if an argument to the IF EQ is missing, SPSS cannot evaluate the result at all, so the result will be set to missing (or possibly ignored and left unchanged). Instead use the MISSING function. MISSING(Test) evaluates to 1 if Test is missing. Garry Gelade Business Analytic Ltd. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mike Donatello Sent: 24 January 2011 19:01 To: [hidden email] Subject: Trouble with system-missing values I seem to be having some weirdness with testing values as missing; i.e., they're not being recognized as such. So, for example, running the following sample COMPUTE Test=$SYSMIS. IF (Test EQ $SYSMIS) Counter=1 . EXECUTE . gives me two variables, Test and Counter, with both set to missing on all cases. I've been using SPSS since the late 80s and I don't think I've ever come across anything like this. Did I make a mistake so obvious that I can't see it? ===================== 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 ===================== 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 |
Free forum by Nabble | Edit this page |