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

st: RE: Different p-values in outreg2 and regression output

From   "Martin Weiss" <>
To   <>
Subject   st: RE: Different p-values in outreg2 and regression output
Date   Sun, 27 Sep 2009 13:53:13 +0200


Assuming you want the upper p-val, you can of course do this by hand, as
seen in this example:

set obs 1000

gen id=_n
lab var id "Person ID"
//individual effect
gen alpha=rnormal(0,0.01)
label var alpha "Individual Effect"
//expand to # of time periods
expand 10
//get time period (after expansion!)
bys id: gen time=_n
lab var time "Time Period"
//residual per time period
gen eps=rnormal()
lab var eps "Idiosyncratic Shock"

gen x1=rnormal()
gen x2=rnormal()
gen x3=rnormal()

gen y=1+alpha+eps


//xtset the thing
xtset id time

xtreg y x1 x2 x3, fe

local p= Ftail( e(df_b), e(df_r), e(F))

outreg2 using myfile.txt,  /*
*/ adds("F test: ", e(F), Prob > F, `p') replace
seeout using "myfile.txt"


-----Original Message-----
[] On Behalf Of
Sent: Sonntag, 27. September 2009 12:00
Subject: st: Different p-values in outreg2 and regression output

Hello all,

I'm using -outreg2- to export panel regression results in excel. I  
would like to have the p-values corresponding to each F-stat of each  
regression (-xtreg, fe-) as well as some other statistics. Thus, I  

outreg2 [M1, M2, M3] using myfile.xls, e(N, r2_a, r2_w, r2_b, r2_o F, p)

Looking at the output, I found that the p-values listed in the  
exported file are not exactly the same as those directly in the  
regression. For example, in the Stata-regression output Prob>F=0.0022  
and in the exported file it is 0.00264. Yet, the F-stats are correct.  
Is it just a strange rounding convention or is there a logical  
explanation for this?

Thanks for any help!

*   For searches and help try:

*   For searches and help try:

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