# NOT RUN {
# First: an estimation
base = iris
names(base) = c("y", "x1", "x2", "x3", "species")
est = feols(y ~ x1 + x2 | species, base)
# "Normal" standard-errors (SE)
est_standard = summary(est, se = "st")
# Clustered SEs
est_clustered = summary(est, se = "clu")
# The different degrees of freedom
# => different type 1 DoF (because of the clustering)
degrees_freedom(est_standard, type = "k")
degrees_freedom(est_clustered, type = "k") # fixed-effects are excluded
# => different type 2 DoF (because of the clustering)
degrees_freedom(est_standard, type = "resid") # => equivalent to the df.residual from lm
degrees_freedom(est_clustered, type = "resid")
# }
Run the code above in your browser using DataLab