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
Frequency spillover and connectedness?I have been asked to investigate spillover frequencies and connectedness for a dataset using Stata, …
Approximating trend in time-seriesHello! I am trying to come up with a metric to capture the temporal pattern of the average of numer…
Insufficient observations for bootstrap standard errors in fixed effects quantile regressionHello, I am new to Stata so any advice on this would really help! I am trying to bootstrap clusterin…
Rolling regression with pooled time series data; plotting 10 year windows with 95% CIHi everyone, I basically want to replicate figure four in Pontusson and Kwon (2010) with different …
Centering the origin of the Cartesian plane in –twoway– graphsDoes anyone have a favorite method for doing this? When I need to produce a graph where (x,y)=(0,0)…
Subscribe to:
Post Comments (Atom)
0 Response to margins after svy
Post a Comment