Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: how to escalate coefficients using outreg2 or a similar program?
From
John Luke Gallup <[email protected]>
To
[email protected]
Subject
Re: st: how to escalate coefficients using outreg2 or a similar program?
Date
Wed, 17 Oct 2012 14:44:46 -0700
-outreg2- (and -outreg-) take all their information about the coefficients directly from the e(b) and e(V) matrices, so you _have_ to modify these matrices if you want to report non-standard estimates. These matrices can only be modified by an -eclass- program, so you must create a program within your .do file to do this. In Benjamin's case, it sounds like he has already created a new estimation command, so all he has to do is use -ereturn post- to save the results in the e(b) and e(V) matrices before running -outreg2-.
pseudocode to do this would look like:
program escalate, eclass
version 12.1
syntax varlist [if] [in] [fw aw] [, *]
oldestimationcommand `varlist' `if' `in' `weigth' `exp', `options'
tempname newb newV
matrix `newb' = e(b)
matrix `newV' = e(V)
... code to change newb and newV ...
ereturn post `newb' `newV' ...
[-ereturn post- clears all the previously posted e() information, so everything you want to keep has to be reposted in the -ereturn post- command]
end
John
On Oct 17, 2012, at 7:45 AM, Benjamin Villena <[email protected]> wrote:
> Hello Statalist members,
>
> In order to numerically stabilize an estimation procedure that uses complicated numerical integration, I need to standardize my regressors X.
>
> I plan to use outreg2 to put several specifications in a table using the same estimation method.
>
> However, I want to report escalated coefficients and standard deviations instead of the ones I get directly from my estimation routine. In other words, I want to divide each coefficient and its standard error by the sample standard deviation of the associated regressor after the estimation, and report them in a table.
>
> I guess I could manipulate e(b) and e(V) in order to get what I want, but then I think I could not use outreg2 to create a table. Is there a simple way to do this using already built code such as outreg2 or similar?
>
> Thanks,
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/