Bookmark and Share

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: storing estimates from nestreg


From   Doug Hess <[email protected]>
To   [email protected]
Subject   Re: st: storing estimates from nestreg
Date   Fri, 22 Jul 2011 10:03:36 -0400

Got it. Turns out I had a problem in the -outreg2- command. So I'm
just posting this to close this thread out (something I'm told I
should be doing but haven't always).

I also wasn't clear in my earlier email; I had gotten the table of
coeff, se, pvalues, etc. to appear in tables prodcued by outreg2, but
I wanted to also store the e(r2) and e(ll) scalars for each model. In
short, after running nestreg, I want an outreg2 command where the
information in the -addstat()- option would come from scalars, like
this below, which does work.  My mistake, I think, was in using
parentheses where I should have used brackets.

webuse auto, clear
nestreg, store(m): reg price mpg weight foreign
est restore m1
ereturn list
estimates table m1 m2 m3
outreg2 [m*] using autotrial, sideway stats(coef se pval aster)
noparen dec(2) excel ///
     addstat(LL, e(ll) , F, e(F), DoF, e(df_r)) replace


Thanks again.

-Doug

Date: Thu, 21 Jul 2011 10:42:33 -0500
From: Richard Williams <[email protected]>
Subject: Re: st: storing estimates from nestreg

It works fine for me. Are you sure you don't have a mistake? Try this:

clear all
webuse auto
nestreg, store(m): reg price mpg weight foreign
est restore m1
ereturn list
estimates table m1 m2 m3


At 09:17 AM 7/21/2011, Doug Hess wrote:
>Can the nestreg function store the various e-class estimates for each
>model? When I issue -est restore- for one of the earlier models that
>ran in the nestreg routine and then issue -ereturn list- the scalars
>and macros returned are all from the last model in the nestreg blocks,
>not the model I restored. My final goal was to run nestreg and then
>run outreg to put the results into excel using the -addstat- option to
>include more info for each model in the output. Or do I just have to
>run each model and use scalars to get those stored one by one.
>
>Thanks, again.  - Doug
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index