fixedse: Compute standard errors for fixed effects

Description Usage Arguments Value Examples

View source: R/fixedse.R

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

1
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

1
2
3
4
5
6
7
8
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))

sgaure/lfe documentation built on Dec. 27, 2019, 8:06 a.m.