Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

using stata svy subpopulation option for running regression

$
0
0

My subpopulation is asian females when I add additional covariates to the model the number of observations in the subpopulation changes. Is there a way to create an indicator for the analytic sample that has complete observations for all the variables in the full specification when running regression with svy subpopulation option?

gen asiansubpop1 = (nh_asian == 1 & female == 1)

svy, subpop(asiansubpop1==1): regress depressvar gen2 gen3 age

svy, subpop(asiansubpop1==1): regress depressvar gen2 gen3 age educ bio1_step1 bio1 oth_fam

The number of observations for the subpopulation changes when I add additional covariates to the model. Is there a way to keep the analytical sample consistent across models?


Viewing all articles
Browse latest Browse all 12111

Trending Articles