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
Estimating the significance of fixed effects with clustered standard errorsHi all, I am estimating the following equation. Code: xtreg lemp lunion lunemployment lfertilit…
use of difference in unbalanced panel dataI am having unbalanced panel data of 84 countries, now the objective of my empirical investigation w…
Calculating adjusted proportionsThere are examples of analyses using Stata (14) that calculates proportion of one variable by adjust…
graph with a small line?Dear All, I have this graph Array by the following data and code. Code: * Example generated by -da…
Merging Datasets -- Variable Responses DeletedHi all, I am merging a number of different datasets and am having trouble with the merge command "d…
Subscribe to:
Post Comments (Atom)
0 Response to margins after svy
Post a Comment