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: Exporting tables of output from non-ereturn commands using outreg2


From   Alex Letko <[email protected]>
To   [email protected]
Subject   Re: st: Exporting tables of output from non-ereturn commands using outreg2
Date   Tue, 24 Jul 2012 18:22:19 +0100

That's quite helpful.  Thank you very much,

Alex

On Fri, Jul 20, 2012 at 1:37 AM, John Luke Gallup <[email protected]> wrote:
>
> Alex,
>
> I think you want to make a table out of the test statistics and critical
> values of the -dfgls- test, which are stored in r(results) after the command
> runs.
>
> It is possible to trick -outreg2- or -outreg- to display tables like this
> if you can post the results with -ereturn post- as if they were estimation
> results.  However you need both a "b" vector _and_ a "V" matrix.  You could
> convert the r(results) matrix into a rowvector "b", and create a dummy
> variance matrix "V", make the row and column names of your "V" matrix the
> same as the column names of "b" and post it with -ereturn post b V-.
> However this is hard to work with because the results are now in a single
> row, and you need to suppress reporting the fake V results.
>
> An easier solution is to use the command -frmttable-, distributed with the
> -outreg- command, which takes a Stata matrix and generates a table, as in
> the following code:
>
> webuse lutkepohl2
> dfgls ln_inv
> frmttable using dfgls, statmat(r(results))
>
> You can include the other -dfgls- r() statistics in the -frmttable- table
> with the -addrows- option.
>
> John
>
>
> On Jul 19, 2012, at 7:12 AM, Alex Letko wrote:
>
> > I was wondering if there is an easy way to use outreg2 (or another
> > results-exporting program), to export results of the dfgls command.  I'm
> > a
> > relatively new user, but I'll do my best to explain.
> >
> > From the manual for outreg2: "outreg2 can report any regression output,
> > provided it conforms to the usual convention for ereturn list."
> >
> > I realize that dfgls does not save anything to the ereturn list, only to
> > r().  I thought I was getting around this by using the eststo command to
> > save the dfgls results to a file and then specify that file in the
> > outreg2
> > command, like so:
> >
> > eststo: dfgls lnHH, maxlag(30)
> > outreg2 [est5] using results1.rft, stats(tstat) replace
> >
> > I get a table that gives me the DF stat for the 1st lag, but I need to
> > show
> > all the lags.  The normal outreg2 specifications don't seem to work,
> > since
> > dfgls is not a normal regression (there is no way to specify giving me
> > more lags).
> >
> > Basically, all I want is a standard output table for my unit root tests,
> > showing DF stats and the significance levels for each lag.  Should I not
> > be
> > using outreg2 for this? Is there an easier program? (I tried with estout
> > but it does not recognize the stored file at all so I can't use that)
> >
> > Thanks for any help,
> >
> > Alex
> > *
> > *   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/
>
>
> *
> *   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/
*
*   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