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)
Querying multiple variables at a timeHi everyone, I am working in a database where each patient has fifteen procedure variables: proc1 pr…
three way panel data regression with fixed effects and clustered error termHi! I want to do a regression on panel data, the data consists of a bank (subscript i), in a countr…
Poisson command on panel datawhen i run the following commnad xtpqml lexp_food year mig_stats_16 mig_stats_yr sex sector edu_hh e…
Within estimator estimateI have the following equation: Array in my data I have year and Id I want to get the within the pa…
Repeated time values within panel when declaring Panel DataHi all, I have a panel data on bilateral trade volume of 55 country pairs for 15 years time period …
Subscribe to:
Post Comments (Atom)
0 Response to Storing and graphing the lincom estimates (inside the loop)
Post a Comment