base = iris
names(base) = c("y", "x1", "x2", "x3", "species")
# A multiple estimation
est = feols(y ~ x1 + csw0(x2, x3), base)
# Getting all the coefficients at once,
# each row is a model
coef(est)
# Example of keep/drop/order
coef(est, keep = "Int|x1", order = "x1")
# To change the order of the model, use fixest_multi
# extraction tools:
coef(est[rhs = .N:1])
# collin + long + na.rm
base$x1_bis = base$x1 # => collinear
est = feols(y ~ x1_bis + csw0(x1, x2, x3), base, split = ~species)
# does not display x1 since it is always collinear
coef(est)
# now it does
coef(est, collin = TRUE)
# long
coef(est, long = TRUE)
# long but balanced (with NAs then)
coef(est, long = TRUE, na.rm = FALSE)
Run the code above in your browser using DataLab