Pat, since parentfigure = 1 if the parent is a biological mother and 0 if the parent is a biological mother, then the command
will list the observations corresponding to biological mothers. On the other hand,
will list the observations of biological fathers. The negation character in Stata is the exclamation mark "!". Stata allows you to run a regression for a subsample using the if qualifier. Here is a reproducible example.
So, as you see above, you can always do analysis on a subsample while the data is in long layout.
Code:
list if parentfigure
Code:
list if !parentfigure & !missing(parentfigure)
Code:
sysuse auto, clear *FULL SAMPLE regress price mpg weight *SAMPLE OF FOREIGN CARS regress price mpg weight if foreign *SAMPLE OF DOMESTIC CARS regress price mpg weight if !foreign
Comment