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]

From |
John Luke Gallup <jlgallup@pdx.edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Exporting tables of output from non-ereturn commands using outreg2 |

Date |
Thu, 19 Jul 2012 17:37:29 -0700 |

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/

**Follow-Ups**:**Re: st: Exporting tables of output from non-ereturn commands using outreg2***From:*Alex Letko <aletko1@gmail.com>

**References**:**st: Exporting tables of output from non-ereturn commands using outreg2***From:*Alex Letko <aletko1@gmail.com>

- Prev by Date:
**RE: st: -traveltime-: "nes not found" error, and empty distances** - Next by Date:
**st: Why is Mata much slower than MATLAB at matrix inversion?** - Previous by thread:
**st: Exporting tables of output from non-ereturn commands using outreg2** - Next by thread:
**Re: st: Exporting tables of output from non-ereturn commands using outreg2** - Index(es):