Search code examples
rfixest

What is the easiest way to get the first stage F-statistic from an feols model?


I am trying to extract the first stage F-statistic from an IV model run using feols in R. My ultimate goal is to report the statistic in a table exported using etable. What is the best way to do this?


Solution

  • Figured it out. The name of the first-stage F statistic is "ivf", and can be accessed via the fitstat function.

    Example:

    reg = feols(Sepal.Length ~ 1 | Sepal.Width ~ Petal.Width, data=iris)
    # get the first-stage F statistic
    fitstat(reg, "ivf")
    
    # produce a table that includes the first-stage F statistic
    etable(reg, fitstat='ivf')