Re: Dropping mothers' records without dropping the child's [message #9096 is a reply to message #9073] |
Wed, 10 February 2016 15:22 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to previous message](/theme/default/images/down.png) |
Reduced-For(u)m
Messages: 292 Registered: March 2013
|
Senior Member |
|
|
"Drop" in your code will drop observations, not variables. Instead, you could just replace the value of the maternal variable you don't want with "." instead of dropping the observation.
Note: be careful with your summary stats/analysis after this, because in some cases it will average over all the observations, and sometimes it will ignore the observations with missing variables, and you could accidentally end up comparing different samples in different places. See the Stata documentation for how to deal with that.
Note note: looking at your explanation, I'm not exactly sure what you want. You want mom's with only 1 kid to have height measures, and no height measures for the other moms, but you still want their kids in the sample? Why?
|
|
|