powered by
Estimating interactive fixed effect models.
interFE(formula = NULL, data, Y, X = NULL, W = NULL, index, r = 0, force = "two-way", se = FALSE, nboots = 500, seed = NULL, tol = 1e-3, max_iteration = 500, binary = FALSE, QR = FALSE, normalize = FALSE)
estimated coefficients.
estimated grand mean.
estimated time-varying factors.
estimated factor loadings.
diagonal matrix of r eigenvalues.
number of iterations before convergence.
estimated unit fixed effects (if imposed).
estimated time fixed effects (if imposed).
model residuals.
residual mean squared error.
information criterion.
logical for whether valid covariates exist.
matrix of outcome data.
array of independent variables.
name of the outcome variable.
name of time-varying control variables.
name of unit/time indicators.
table of final estimates.
matrix of bootstrap results.
an object of class "formula": a symbolic description of the model to be fitted.
a data frame.
outcome variable.
time-varying covariates.
weights.
a two-element string vector specifying the unit (group) and time indicators.
an integer specifying the number of factors.
a string indicating whether unit/time/both fixed effects will be imposed: "none", "unit", "time", or "two-way".
logical; if TRUE, computes bootstrap-based standard errors.
TRUE
number of bootstrap runs (ignored if se=FALSE).
se=FALSE
random seed.
tolerance for EM algorithm.
max number of EM iterations.
logical flag for a probit link (not fully supported here).
logical flag for QR-based factor analysis in probit model (not fully supported).
logical; if TRUE, scales outcome/covariates.
Licheng Liu; Ye Wang; Yiqing Xu
interFE estimates interactive fixed effect models as in Bai (2009).
interFE
Bai, J. (2009). Panel data models with interactive fixed effects. Econometrica, 77(4), 1229-1279.
print.interFE, fect
print.interFE
fect
library(fect) data(fect) d <- simdata[-(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