Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Nick Cox <n.j.cox@durham.ac.uk> |

To |
"'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: How to include postestimation results (matrix form) in a regression table created by outreg2? |

Date |
Thu, 14 Jun 2012 11:35:52 +0100 |

Glad you solved your problem. Pedantic would be my middle name if it were not John already, but it really is best _not_ to think of -outreg- and -outreg2- as different versions of the same program. That's been incorrect for some years now. They are now quite different programs with broadly similar aims but radically different implementation. Nick n.j.cox@durham.ac.uk Martin Stürmer Dear Nick, thank you for this information, especially with respect to the different versions of outreg. I have just found a solution by first extracting the matrix, then transform it to scalars and finally adding them to the table by addstat: estat bgodfrey, lags(2) matrix x=r(p) scalar x1=x[1,1] scalar x2=x[1,2] outreg2 using myfile, tex addstat(B-G-test of serial autocorrelation of order 1,x1,order 2,x2) scalar drop _all Nick Cox You may get a detailed reply from a user of -outreg2- (SSC, as you are asked to explain). Otherwise the generic advice about support on -outreg2- given in (for example) http://www.stata.com/statalist/archive/2010-08/msg01492.html http://www.stata.com/statalist/archive/2011-10/msg01319.html still stands. In addition, it may help to be aware that -outreg2- has not been updated since 2010. That in itself certainly does not rule out there being a solution for your problem. But it does imply that the discussion in the documentation of -outreg2- of the quite different program -outreg- is now seriously out-of-date. -outreg2- (author Roy Wada) was originally made public as an extension of -outreg- (SJ, SSC; John Gallup) at a time when it appeared that -outreg- was not being developed further. But since then John has extensively rewritten -outreg- and is actively maintaining it. Evidently neither author wishes to change their program's name. Nick On Thu, Jun 14, 2012 at 8:19 AM, Martin Stürmer <martin.stuermer@uni-bonn.de> wrote: > sorry for reposting. I would be very grateful, if somebody could help > me. I would like to include a matrix of post-estimation results in a > table created by outreg2. > > In more detail, I run a regression of the type: > regress x l.x y l.y > > I than run a Breusch-Godfrey Test of serial correlation of order 1 and 2: > estat bgodfrey, lags(2) > > I would like to add the two sided p-values of this test to a > regression table using outreg2. These values are saved in the 1x2 matrix r(p). > > Using > outreg2 using myfile, tex addstat(BG-test p-value, r(p)) I obtain the > error "type mismatch" due to the fact that r(p) is a 1x2 matrix > > How to add this matrix to the regression table? * * 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/

**References**:**st: How to include postestimation results (matrix form) in a regression table created by outreg2?***From:*Martin Stürmer <martin.stuermer@uni-bonn.de>

**Re: st: How to include postestimation results (matrix form) in a regression table created by outreg2?***From:*Nick Cox <njcoxstata@gmail.com>

**AW: st: How to include postestimation results (matrix form) in a regression table created by outreg2?***From:*Martin Stürmer <martin.stuermer@uni-bonn.de>

- Prev by Date:
**AW: st: How to include postestimation results (matrix form) in a regression table created by outreg2?** - Next by Date:
**Re: st: marginal effects in biprobit and average treatment effect in switching probit** - Previous by thread:
**AW: st: How to include postestimation results (matrix form) in a regression table created by outreg2?** - Next by thread:
**st: Syntax for trimming distribution tail In xtabond2** - Index(es):