% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ife.R
\name{.compute_ic}
\alias{.compute_ic}
\title{Compute Information Criteria for a Given Number of Factors (Internal)}
\usage{
.compute_ic(V_r, r, N, TT, p, force)
}
\arguments{
\item{V_r}{scalar: mean squared residual = mean(u_mat^2)  (not df-adjusted)}

\item{r}{integer: number of factors}

\item{N, TT}{panel dimensions}

\item{p}{number of covariates}

\item{force}{additive FE spec (for np calculation)}
}
\value{
named list: IC1, IC2, IC3 (Bai & Ng 2002), IC_bic and PC (Bai 2009/fect)
}
\description{
Evaluates five information criteria for a fitted IFE model with
\code{r} factors, given the mean squared residual \code{V_r}. Returns IC1, IC2, and IC3
from Bai and Ng (2002) Proposition 1 (ICp1/ICp2/ICp3), applied to IFE
residuals as suggested by Bai (2009) Section 9.4, plus a BIC-style criterion
(\code{IC_bic}) and a small-sample-corrected prediction criterion (\code{PC}) as
implemented in the \pkg{fect} package (C++ source, lines 196--224).
Called once per candidate \code{r} inside \code{ife_select_r()}.
}
\keyword{internal}
