Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Creating variable in Stata


From   "Shellenberg, Kristen" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: Creating variable in Stata
Date   Fri, 19 Mar 2010 14:11:27 -0400

Hello Stata-listers,

I'd like to create a variable that indicates whether several variables in the dataset (77 actually) are all coded as missing (.) for a respondent.  I've tried the following with no luck... 

gen info_C=0
replace info_C=1 if variable4/variable81==.

and 

gen info_C=0
replace info_C=1 if variable4-variable81==.

Can anyone tell me how to generate a variable that will tell me if a whole set of variables were coded as missing without writing out replace info_C=1 if variable1==.& variable2==. and so on for all 77 variables?

Thank you!

Kristen 
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index