Search code examples
stataestimation

Retrieving F-test statistic on fixed effects joint significance in -xtreg-


I am running the equivalent of the following regression:

sysuse auto, clear

xtset rep78
xtreg mpg weight, fe 

and I need to store the F-statistic on the F-test of joint significance of the model fixed effects (in this case, F(4, 63) = 1.10 in the output).

I inspected the post-estimation documentation of xtreg and searched online, but I couldn't find any information on this. Many thanks


Solution

  • The line you refer to in the sample output for your fixed effects regression is

    F test that all u_i=0: F(4, 63) = 1.10
    

    You don't want to be looking in help xtreg postestimation but rather in help xtreg, the output of which includes at the bottom the list of stored results returned in e(). Among those, in the section on xtreg, fe is

    e(F_f)              F for u_i=0
    

    If you are unfamiliar with working with stored results returned in e() you will want to review help ereturn.