After running the regression, I did the lincom, and then stored the estimates (with local as well as esttad scalar commands). After that I try to plot these estimates by using coefplot. I am unable to. Can someone please help? Also, if possible, I'd like to do the graphs inside the loop.
Is there another way of graphing lincom estimates other than using coefplot? Here is my command:
loc interact_controls "c.subj_male#c.conf_male c.subj_male#c.conf_female c.subj_female#c.conf_male c.subj_female#c.conf_female"
foreach DV of varlist ped_help eyecontact ped_comfort {
reg `DV' `interact_controls', noc cluster(CLUSTER)
* Male subject (DVs) female confederate more/less by (coefficient)
lincom c.subj_male#c.conf_female - c.subj_male#c.conf_male
loc coef_msubj_conf = r(estimate)
loc se_msubj_conf = r(se)
* Female subject (DVs) female confederates more/less by (coefficient)
lincom c.subj_female#c.conf_female - c.subj_female#c.conf_male
loc coef_fsubj_conf = r(estimate)
loc se_fsubj_conf = r(se)
* Difference of the two lincom estimates
lincom coef_msubj_conf - coef_fsubj_conf
loc coef_diff = r(estimate)
loc se_diff = r(se)
* Plot lincom coefficient estimates and standard errors
*coefplot coef_msubj_conf coef_fsubj_conf coef_diff, drop(_cons) yline(0) vertical bycoefs byopts(yrescale)
}
Related Posts with Storing and graphing the lincom estimates (inside the loop)
Using semipar together with margins and marginsplotHi, I am trying to make a margin plot after running a semipar command. Specifically, for npreg comma…
How to test if the mean of a sample is significantly different from zeroHi everyone, I have a sample of 166 bonds (i.e. n=166). I have broken these down into subsamples ba…
custom maximum likelihood estimators - best way to check for convergence?I've made a package to estimate a model by maximum likelihood. I'd like to store a result as e(conve…
Dropped year-dummies in panel regressionDear Statalisters, I have some issues understanding year-dummies being dropped in a fixed effects …
estimation sample variesGood day, I get following error message Code: bys id: gen treatment=0 if (expectation==2 & f.…
Subscribe to:
Post Comments (Atom)
0 Response to Storing and graphing the lincom estimates (inside the loop)
Post a Comment