|
To follow up on this, it turned out that the case returned with the
second set of syntax was not the one I was looking for. The value for that case is NOT -4 but is a 0, which still fits the select rule. So I'm stil left with why the first set of syntax below did not return the one case with a -4. I don't know if this is an error or something to do with the user-missing value, but it seems I should be able to work with the actual value that's entered (-4). thanks, Dennis >Gang, >I'm using SPSS Mac v16.0.2. I ran frequencies on a variable, and >saw a value of -4 that I would like to investigate further by >pulling the hardcopy of the individual's data. If it's of any >relevance, the value of -4 is defined as user-missing for this >variable. > >The following syntax returned no cases: > >temp. >select if (q6 = -4). >list id. > > >The following syntax did return the case with the -4 value: > >temp. >select if (q6 <= 0). >list id. > >Any ideas as to why the first syntax did not work? > >Thanks, >Dennis ===================== 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 |
|
The result of a comparison for any missing value is missing.
do something like: select if missing(q6). ----- Original Message ----- From: "D.R. Wahlgren" <[hidden email]> To: <[hidden email]> Sent: Wednesday, May 20, 2009 2:43 PM Subject: SPSS error? > To follow up on this, it turned out that the case returned with the > second set of syntax was not the one I was looking for. The value > for that case is NOT -4 but is a 0, which still fits the select rule. > So I'm stil left with why the first set of syntax below did not > return the one case with a -4. I don't know if this is an error or > something to do with the user-missing value, but it seems I should be > able to work with the actual value that's entered (-4). > > thanks, > Dennis > > >>Gang, >>I'm using SPSS Mac v16.0.2. I ran frequencies on a variable, and >>saw a value of -4 that I would like to investigate further by >>pulling the hardcopy of the individual's data. If it's of any >>relevance, the value of -4 is defined as user-missing for this >>variable. >> >>The following syntax returned no cases: >> >>temp. >>select if (q6 = -4). >>list id. >> >> >>The following syntax did return the case with the -4 value: >> >>temp. >>select if (q6 <= 0). >>list id. >> >>Any ideas as to why the first syntax did not work? >> >>Thanks, >>Dennis > > ===================== > 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 |
|
Dennis,
You can also use the VALUE(<varname>) function to force the comparison to evaluate user missing values, as in: Select if (value(q6) = -4). This is advantageous if you have more than one user-missing value designated for a variable and don't want to include all of them. David Matheson SPSS Statistical Support -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of ViAnn Beadle Sent: Wednesday, May 20, 2009 4:39 PM To: [hidden email] Subject: Re: SPSS error? The result of a comparison for any missing value is missing. do something like: select if missing(q6). ----- Original Message ----- From: "D.R. Wahlgren" <[hidden email]> To: <[hidden email]> Sent: Wednesday, May 20, 2009 2:43 PM Subject: SPSS error? > To follow up on this, it turned out that the case returned with the > second set of syntax was not the one I was looking for. The value > for that case is NOT -4 but is a 0, which still fits the select rule. > So I'm stil left with why the first set of syntax below did not > return the one case with a -4. I don't know if this is an error or > something to do with the user-missing value, but it seems I should be > able to work with the actual value that's entered (-4). > > thanks, > Dennis > > >>Gang, >>I'm using SPSS Mac v16.0.2. I ran frequencies on a variable, and >>saw a value of -4 that I would like to investigate further by >>pulling the hardcopy of the individual's data. If it's of any >>relevance, the value of -4 is defined as user-missing for this >>variable. >> >>The following syntax returned no cases: >> >>temp. >>select if (q6 = -4). >>list id. >> >> >>The following syntax did return the case with the -4 value: >> >>temp. >>select if (q6 <= 0). >>list id. >> >>Any ideas as to why the first syntax did not work? >> >>Thanks, >>Dennis > > ===================== > 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 ===================== 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 |
