I am using the coefplot
command in Stata to plot coefficients and confidence intervals from multiple regression models. I am plotting the same coefficient (X) from 4 different model specifications.
There is one model specification (alternative standard errors) that I cannot figure out how to estimate in Stata, but am able to estimate using R. That means that for one model specification, I have the standard error in R, but not in Stata.
Is there an easy way to manually alter the standard errors in coefplot?
My code is:
coefplot A B C D, drop(_cons) xline(0) keep(X)
How can I add to this code that the standard errors for coefficient X in model D should be Z?
You can manually edit the
e(V)
(variance-covariance matrix) ande(b)
vectors. For this, define a program:Note that, to reach the covariance matrix, you need to take the square of the standard errors from your output in
R
. Good luck!