How to extract fixed-effect estimates from fixest::feols() model?

478 views Asked by At

The documentation of the feols() function in the fixest package provides the following usage example:

library(fixest)
res = feols(Sepal.Length ~ Sepal.Width + Petal.Length | Species, iris)
summary(res)

Which gives this result:

OLS estimation, Dep. Var.: Sepal.Length
Observations: 150 
Fixed-effects: Species: 3
Standard-errors: Clustered (Species) 
             Estimate Std. Error t value Pr(>|t|)    
Sepal.Width  0.432217   0.161308 2.67945 0.115623    
Petal.Length 0.775629   0.126546 6.12925 0.025601 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
RMSE: 0.305129     Adj. R2: 0.859538
                 Within R2: 0.641507

I can also see the information above for each covariate using res$coeftable:

              Estimate Std. Error   t value     Pr(>|t|)
Sepal.Width  0.4322172 0.08138982  5.310458 4.025982e-07
Petal.Length 0.7756295 0.06424566 12.072869 1.151112e-23

My question is, how do I get the estimate, SE, t values and p values for the fixed-effects? In this case, I want to see this information for "setosa", "versicolor", "virginica" of the variable "Species". I read the function documentation and poked around a bit in the res object, but could not find a solution to my problem.

0

There are 0 answers