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
Use list of variables in dta file to rename variable in other datasetHi, In the current project I'm working on, I keep updating a list of variables. I would like to use…
Find observations with same content for one variableI would like to find out which observations have the same content for one variable. Is there a comma…
T-TEST interpretationI’m testing the significance of a predictor through a t-test, after having made an univariate analys…
Using and interpreting coefficients of categorical variables in Probit Marginal AnalysisI am writing my bachelor's thesis that aims to investigate how a liberal outlook affects one's incom…
Including blank cells in regression analysisHi all, I am doing an mixed regression analysis looking at protein intake and want to include sociod…
Subscribe to:
Post Comments (Atom)
0 Response to margins after svy
Post a Comment