% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ife.R
\name{.ife_se}
\alias{.ife_se}
\title{Compute Standard Errors for the IFE Estimator}
\usage{
.ife_se(beta, X_tilde, u_mat, N, TT, r, force, se_type)
}
\arguments{
\item{beta}{p x 1 coefficient vector}

\item{X_tilde}{T x N x p projected covariate array}

\item{u_mat}{T x N residual matrix from the full model}

\item{N, TT}{panel dimensions}

\item{r}{number of factors}

\item{force}{additive FE specification (for df computation)}

\item{se_type}{"standard" | "robust" | "cluster"}
}
\value{
list:
vcov_mat   p x p estimated variance-covariance matrix
df         residual degrees of freedom
}
\description{
Constructs the sandwich variance-covariance matrix for the IFE
coefficient vector using the Frisch-Waugh-Lovell principle. The effective
regressors are the factor-projected covariates \eqn{\tilde{X}_{it}} (i.e.,
demeaned X after removing the factor space). Three estimators are supported:
homoskedastic (\code{"standard"}), HC1 heteroskedasticity-robust (\code{"robust"}), and
cluster-robust by unit (\code{"cluster"}), following Cameron, Gelbach and Miller
(2011). Degrees of freedom account for regression coefficients, interactive FE
parameters, and additive FE parameters.
}
\keyword{internal}
