% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/est_ife.R
\name{.fit_ife}
\alias{.fit_ife}
\title{Post-process a dcce_fit into an IFE fit}
\usage{
.fit_ife(
  panel,
  y_name,
  x_names,
  n_factors = NULL,
  max_iter = 100L,
  tol = 1e-08,
  include_constant = TRUE
)
}
\arguments{
\item{panel}{Prepared panel data.frame.}

\item{y_name}{Character: dependent variable name.}

\item{x_names}{Character: regressor names.}

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

\item{max_iter}{Integer: maximum iterations. Default 100.}

\item{tol}{Numeric: convergence tolerance on beta. Default 1e-8.}

\item{include_constant}{Logical: include unit FE? Default TRUE.}
}
\value{
A list with \code{coefficients}, \code{vcov}, \code{se},
\code{factors}, \code{loadings}, \code{n_factors}, \code{residuals},
\code{r2}, and related fields.
}
\description{
Called from \code{dcce()} when \code{model = "ife"}. Runs the Bai (2009)
iterative PC estimator on the panel stored inside the fit.
}
\keyword{internal}
