Learn R Programming

dcce (version 0.4.2)

.fit_ife: Post-process a dcce_fit into an IFE fit

Description

Called from dcce() when model = "ife". Runs the Bai (2009) iterative PC estimator on the panel stored inside the fit.

Usage

.fit_ife(
  panel,
  y_name,
  x_names,
  n_factors = NULL,
  max_iter = 100L,
  tol = 1e-08,
  include_constant = TRUE
)

Value

A list with coefficients, vcov, se, factors, loadings, n_factors, residuals, r2, and related fields.

Arguments

panel

Prepared panel data.frame.

y_name

Character: dependent variable name.

x_names

Character: regressor names.

n_factors

Integer or NULL: number of factors. If NULL, the BIC3 criterion of Bai & Ng (2002) is used to select \(r\).

max_iter

Integer: maximum iterations. Default 100.

tol

Numeric: convergence tolerance on beta. Default 1e-8.

include_constant

Logical: include unit FE? Default TRUE.