At 07:26 PM 12/6/2012, AndrewM wrote:
>I have a large data set where many of the cells are blank (these are
>string variables) and SPSS is not recognizing them as [missing] when
>I run a missing value analysis.
>
>I found the syntax below online to define the blanks in a variable
>as missing. (The variable in dataset as an example is q63_1.)
>
>MISSING VALUES q63_1 (' ')
>
>But now I need to do this for about 200 variables, i.e. q64_1, q65_,
>q66_1 and so on. Any suggestions on how to do this en masse?
The MISSING VALUES command accepts a list of variables. You could say
MISSING VALUES q63_1 q64_1 q65_ q66_1 (' ').
If any of the variables you want to set missing values for are in
sets that are contiguous in the file, you can shorten further. For
example, if q64_1 to q68_2 are contiguous, you could write
MISSING VALUES q63_1, q64_1 TO q68_2, q75 (' ').
>I've heard of DO REPEAT and I was wondering if this could this work here?
It could, but it's easier to write one MISSING VALUES statement for
all the variables (as above) than to use DO REPEAT on the same list
of variables to generate separate MISSING VALUES statements.
=====================
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