Estimating interactive fixed effect models.
interFE(formula = NULL, data, Y, X, index, r = 0, force = "none",
se = TRUE, nboots = 500, seed = NULL,
tol = 1e-3, binary = FALSE, QR = FALSE, normalize = FALSE)
estimated coefficients.
estimated grand mean.
estimated factors.
estimated factor loadings.
a diagonal matrix that consists of the r eigenvalues.
the number of iteration before convergence.
estimated unit fixed effect (if force
is "unit" or "two-way").
estimated time fixed effect (if force
is "time" or "two-way").
residuals of the estimated interactive fixed effect model.
mean squared error of the residuals.
the information criterion.
a logical flag specifying whether there are valid covariates.
a matrix storing data of the outcome variable.
an array storing data of the independent variables.
name of the outcome variable.
name of the time-varying control variables.
name of the unit and time indicators.
a table of the estimation results.
a matrix storing results from bootstraps.
an object of class "formula": a symbolic description of the model to be fitted.
a data frame (must be with a dichotomous treatment but balanced is not required).
outcome.
time-varying covariates.
a two-element string vector specifying the unit (group) and time indicators. Must be of length 2.
an integer specifying the number of factors.
a string indicating whether unit or time fixed effects will be imposed. Must be one of the following, "none", "unit", "time", or "two-way". The default is "unit".
a logical flag indicating whether uncertainty estimates will be produced via bootstrapping.
an integer specifying the number of bootstrap
runs. Ignored if se = FALSE
.
an integer that sets the seed in random number
generation. Ignored if se = FALSE
and r
is specified.
a numeric value that specifies tolerate level.
a logical flag indicating whether a probit link function will be used.
a logical flag indicating whether QR decomposition will be used for factor analysis in probit model.
a logic flag indicating whether to scale outcome and
covariates. Useful for accelerating computing speed when magnitude of data is large.The default is normalize=FALSE
.
Licheng Liu; Ye Wang; Yiqing Xu
interFE
estimates interactive fixed effect models proposed by
Bai (2009).
Jushan Bai. 2009. "Panel Data Models with Interactive Fixed Effects." Econometrica 77:1229--1279.
print.interFE
and fect
library(fect)
data(fect)
d <- simdata1[-(1:150),] # remove the treated units
out <- interFE(Y ~ X1 + X2, data = d, index=c("id","time"),
r = 2, force = "two-way", nboots = 50)
Run the code above in your browser using DataLab