|
Since you say that you have no problem computing the maximum value, I will
just deal with how to have the computer "ignore" your missing value codes
without returning an answer of system missing any time that any of the
values you are comparing is missing. (What would happen if you used a
sequence of IF commands to select the maximum, for example.) The answer is
simple -- recode your positively numbered missing value codes to
corresponding negatively numbered codes (thus 99 will become -99, etc.).
After you've calculated maxeduc, either recode the negatives back to
positives (what I did when I was using IF commands to make the
comparisons) or just do new missing values for the individual values (a
single syntax command will do it).
-- Pow
PS: Be SURE to put in a missing values designation for your computed
maximum (maxeduc) that specifies that values < 0 for the computed maximum
AND values > 20 (or whatever) are missing. That way, if ALL the values for
educ68, educ69, educ70, etc. are missing, the computed maximum will also
be missing; and if you fail to recode a positive missing value because
someone mis-typed 91 for 97 (or whatever), it will also be missing.
If you forget to do that, and you're doing a parametric analysis; your
results will be almost completely meaningless if you treat even a few - 99
values or plus 99 values as valid. CHECK by running a frequencies table
for maxeduc, to make ABSOLUTELY sure that you don't have any missing value
outliers on either the plus or the minus side that are being counted as
valid.
Been there; done that. :-(
***************************************************************************
Powhatan J. Wooldridge, Assoc. Professor, Nursing, State Univ. NY at Buffalo
On Wed, 17 Oct 2001, Jessica Kenty wrote:
> HI,
>
> I have a syntax question about computing a variable that is the maximum
> value found for several other variables.
>
> I want to find the maximum years of education for individuals in my
> longitudinal file (1968-1999). People are not asked their "highest level of
> education" every year though, so no one variable is ever a complete
> education intake for any given year. I need to pull the highest value
> reported over time to compute a variable called "maxeduc". (i.e. max
> (educ68, educ69, educ70...educ99) ) This is relatively simple, except I
> have "missing values" of 97, 98, 99 -- so some people who have an instance
> of missing data end up with a maxeduc = 97, 98, or 99. How do I take the
> max, but tell SPSS to ignore values that = 97, 98, 99 which are missing?
> Note: I have already denoted these values as "missing values" for these
> variables in SPSS & that did not make a difference when pulling the max
> value.
>
> Thanks for your help in advance!
>
> Jessica
>
> Jessica Kenty
> Research Assistant
> Assets & Educational Inequality Project
> Northeastern University
> Boston, MA
>
>
>
>
|