Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

st: Creating variable in Stata

From   "Shellenberg, Kristen" <>
To   "" <>
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==.


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!

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index