I am looking at the differences in wages for specific occupations by marital status. Note marital status is coded as 0=married, 1=single, 2=divorced/separated/widowed. My code for the regression is:
xi: svy, subpop(if occ1==1): glm wages i.maritalstatus age agesq experience female i.race metro hrsworked familyincome, family(gamma) link(log)
After running the above (which runs successfully), I try to get the predicted mean wages for specific occupation by marital status for female. My code is as follows:
margins, dydx(maritalstatus) subpop(if occ1==1) at(female==1)
The margins command is unable to recognize maritalstatus as a categorical variable and gives me the following error:
invalid dydx() option;
'maritalstatus' not found in list of covariates
What am I doing wrong? Thank you for your help.
Related Posts with margins after svy
NA's in sureg()Hi, How are NAs in the dependent variable column dealt for in sureg()? I want to estimate a system …
Interaction analysis - Problematic Wald test results- …
Marginal effects at representative valuesDear all, I am working with Stata's margins command and have some difficulties to interpret the mea…
r(198) invalid varnameHello , I do not know why stata tell me "r(198)invalid varname. " I check it for several times. I ho…
Generating sequence of observations.Hi, I have the "have" variable and based on that "have" variable, I want to generate the two variabl…
Subscribe to:
Post Comments (Atom)
0 Response to margins after svy
Post a Comment