Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

fixedse

Compute standard errors for fixed effects


Description

fixedse computes the standard errors for the fixed effects when there is only one. While getfe can provide standard errors, it does so by bootstrapping for general estimable functions. In the special case that there's only a single fixed effect, and the estimable function is just the levels, this function can be used to compute the fixed effects without bootstrapping. It requires that felm is run with keepX=TRUE.

Usage

fixedse(est, lhs = NULL, E)

Arguments

est

'felm' object. The result of a call to felm.

lhs

character. Name of the left hand side, if more than one.

E

Matrix. Estimable function. Not used at the moment.

Value

numeric. Vector of standard errors.

Examples

x <- rnorm(1000)
f <- factor(sample(5,1000,replace=TRUE))
y <- x + (1:5)[f] + rnorm(1000)
est <- felm(y ~ x | f, keepX=TRUE)
#both bootstrap and computed se:
cbind(getfe(est,ef=efactory(est,'ref'),se=TRUE), fse=fixedse(est))
#compare with lm:
summary(lm(y ~x+f-1))

lfe

Linear Group Fixed Effects

v2.8-6
Artistic-2.0
Authors
Simen Gaure [aut] (<https://orcid.org/0000-0001-7251-8747>), Grant McDermott [ctb], Karl Dunkle Werner [ctb], Matthieu Stigler [ctb, cre] (<https://orcid.org/0000-0002-6802-4290>), Daniel Lüdecke [ctb]
Initial release
2021-01-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.