Jia De Gedeon Lim
unread,May 27, 2013, 11:31:00 PM5/27/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to income-dynam...@googlegroups.com
Hey everyone,
I noticed that my Stata gives me a missing value when I generate a new variable that equals the sum of two other variables when the value of either one variable is missing.
E.g. from Ajay's solowhh_dataprep.do
arisredsload hh82/Deck 9.dta
gen vfarmasst = v9 + v10
collapse (sum) vfarmasst, by(v3)
rename v3 id1982
sort id1982
tempfile farmasst82
save `farmasst82'
Running the first part of the code (gen vfarmasst...) actually generates 6014 missing values but in some of these cases, for e.g., v9 is missing but v10 has a integer value. It is just the case that Stata, probably treating . as a infinite value (?) codes vfarmasst with a missing value as well.
Just thought I'd point this out 'cos I never realized that my Stata does this and I'm wondering if it's a problem that occurs only on a/my Macbook or it is a universal occurrence. Thanks!
Best,
Gedeon