Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

Re: st: Query

From   Mario Veneziani <>
Subject   Re: st: Query
Date   Thu, 19 Apr 2012 10:59:51 +0200

Dear Nick,

thank you very much for correcting my mistake.

Clearly I did something wrong since it now works for me too!

Best regards,

Il 19 aprile 2012 10:05, Nick Cox <> ha scritto:
> Not so.
> . ssc type frmttable.sthlp
> reveals the help file. Somehow you didn't install it. -ssc inst
> outreg, replace- worked fine for me. -ssc- is a very good command!
> Nick
> On Thu, Apr 19, 2012 at 8:59 AM, Mario Veneziani
> <> wrote:
>> Thank you for pointing us to the features of -outreg- -outreg2- and
>> -estout- and appreciate the usefulness of the -frmttable- command in
>> helping us formatting tables which are not the result of an estimation
>> command.
>> I have tried to implement your suggestion to Mark but, despite having
>> installed both -outreg- and -outreg2- (-estout- was already installed
>> on my STATA 12 MP), I am unable to access the help file for the
>> -frmttable- command. It seems to me that the automatic download and
>> install procedure does not include a help file for -frmttable- itself.
>> Il 19 aprile 2012 01:24, John Luke Gallup <> ha scritto:
>>> You cannot use -outreg-, -outreg2-, or -estout- to format the statistics from -corrgram- directly, because it is not an estimation command.  In particular, it does not save results in the e(b) matrix.  Instead it saves results in r() matrices.
>>> You can create a formatted table of -corrgram- statistics with the following commands using the program -frmttable-, which is the backend of -outreg-.  It takes a Stata matrix and creates a formatted table in Word or TeX.
>>> webuse air2, clear
>>> corrgram air, lags(20)
>>> mat lags = J(r(lags),1,0)
>>> mat probQ = lags
>>> mat Q = r(Q)'
>>> forvalues r=1/`r(lags)' {
>>>        mat lags[`r',1] = `r'
>>>        mat probQ[`r',1] = chi2tail(`r',Q[`r',1])
>>> }
>>> mat stat = lags,r(AC)',r(PAC)',Q,probQ
>>> frmttable using corrgram.doc, statmat(stat) ctitle("Lag","AC","PAC","Q","Prob>Q") ///
>>>        sdec(0,4) replace
>>> The reason for the matrix commands above is to calculate the "Prob>Q" p-values which are not saved in r() values after the -corrgram- command.
>>> The -frmttable- command is part of the -outreg- package, which you can download with the command -ssc install outreg, replace-.  Find more information in -help frmttable- after you download it.
> *
> *   For searches and help try:
> *
> *
> *

Mario Veneziani
Research Assistant
Istituto di Economia Agroalimentare
Università Cattolica del Sacro Cuore
Piacenza, Italy

*   For searches and help try:

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