Bookmark and Share

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, is already up and running.

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

st: Problems with outreg2 addstats and keep

From   Beatrice Crozza <>
To   statalist <>
Subject   st: Problems with outreg2 addstats and keep
Date   Thu, 18 Aug 2011 15:02:33 +0100

Dear All,

I would like to have a table with the results of two regressions, the
respective Wald test and the corresponding p-value.
However, I am not able to figure out how to have two p-values.
This is my code:

reg AI1 SI1
est store a
test( _cons=0) (SI1=1)
local F1=r(F)
local p1= r(p)
reg AI2 SI2
est store b
test( _cons=0) (SI2=1)
local F2=r(F)
local p2= r(p)
outreg2 [a b] using 2test, stats (coef, tstat) addstat(Test 1 F, `F1',
Test 2 F, `r(F)', Prob >F, `r(p)') bdec(3) tdec(2) pdec(3) tex replace

Another problem concerns keep. If I type the following code I receive
the results for all the variables and not just for those specified.
What I am doing wrong?

outreg2 using myfile2, sum keep(SI1 AI1 EI1 SI2 AI2 EI2 SI3 AI3 EI3
SI4 AI4 EI4) tex replace eqdrop(N min max)

Thank you very much for your help.
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index