stataexport-to-word

Export Hausman test


I am searching for a way to export my Hausman test in Stata (hausman model1 model2) Can someone help me with that?

Optionally I am open to any other suggestions on how to report findings of conducted Hausman tests in Stata for my paper. I think when I report having conducted it, I need to append the results (correct me if I'm wrong!)


Solution

  • I'm not sure what you mean exactly by exporting (exporting to Excel, exporting to a table, etc...)?

    In any case, from help hausman:

    hausman stores the following in r():
    
    Scalars   
      r(chi2)        chi-squared
      r(df)          degrees of freedom for the statistic
      r(p)           p-value for the chi-squared
      r(rank)        rank of (V_b-V_B)^(-1)
    

    So these are the results you can access after running hausman. For example:

    hausman model1 model2
    scalar chi2 = r(chi2)
    

    The above code stores the chi-square in a scalar. You can then use this scalar to export it the way you want.