lfe (version 2.8-2)

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

Run this code
# NOT RUN {
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))
# }

Run the code above in your browser using DataCamp Workspace