Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: handling missing values


From   Eva Poen <[email protected]>
To   [email protected]
Subject   Re: st: handling missing values
Date   Mon, 2 Mar 2009 20:19:53 +0000

Jillian,

I'm not sure how SPSS handles missing values, but to me it sounds like
a case for extended missing values. Assume that, for each question,
you coded 1 for "yes" and 0 for "no". For "don't know", you can assign
one of the extended missing values, e.g. .a (dot a). For "refused"
responses, you could give .b (dot b). This way, if you -tabulate,
missing- your variables, you can see for what reasons some
observations are missing. Note that you can also assign labels to
extended missing values:

label define missing .a "don't know" .b "refused"

(see -help label-). -help missing- will also be a good read.


You will still have to tell Stata about your rules though:

replace Q2 = Q1 if inlist(Q1,0,.a,.b)

Hope this helps,
Eva


2009/3/2 Jillian Flight <[email protected]>:
> Hi there,
> I am working on a survey data recode and wanted to see if there is an easy
> way to handle missing values.   For instance, if question 1 asks whether or
> not respondent used cocaine in lifetime - and the responses are yes, no,
> don't know and refused.  Question 2 (have you used in past 12 months -
> response choices yes, no, dk, ref )  however is asked only of those who
> said yes to question 1 - the no, dk, and refused responses from Question 1
> are missing - - is there a quick and easy way to recode question 2 so that
> it is among the total population - ie. the missing values that are a result
> of respondents saying "no" to question 1 being coded into the "no" of
> question 2 and the dk and refused choices from question 1 which are now
> missing in question 2 - having them coded into the dk and refused of
> question 2?  I am currently doing this via a very convaluded method and a
> colleague told me spss is much easier for handling missing values when
> recoding data such as this, but I'm thinking there must be an easy way of
> doing this in stata.
>
> Thanks

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index