% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{.simulate_cfm_eigen}
\alias{.simulate_cfm_eigen}
\title{Reference eigenvalues for the efa_nest() simulation via the shared kernel.}
\usage{
.simulate_cfm_eigen(nf, N, Lambda, Psi, nreps = 1000L)
}
\arguments{
\item{nf}{integer. Position of the empirical eigenvalue being tested (1-based);
the \code{nf}-th largest simulated eigenvalue is returned per replicate.}

\item{N}{integer. Number of cases / observations per simulated dataset.}

\item{Lambda}{numeric matrix. Loadings of the \code{(nf - 1)}-factor reference model
(\verb{p x (nf - 1)}); pass a \verb{p x 0} matrix for the \code{nf == 1} null (identity) model.}

\item{Psi}{numeric vector. Uniquenesses (\code{1 - h2}) of the reference model.}

\item{nreps}{integer. Number of datasets to simulate.}
}
\description{
Internal helper called from efa_nest(). Simulates \code{nreps} datasets from an
\code{(nf - 1)}-factor reference model, given that model's loadings \code{Lambda} and
uniquenesses \code{Psi}, and returns the \code{nf}-th largest eigenvalue of each simulated
correlation matrix. The data are drawn with the shared Z * M rule (see
.simulate_cfm_mvn()) using the factor-score square root
\verb{M = t([Lambda | diag(sqrt(Psi))])}, so a row \code{randn(1, nf - 1 + p) * M} is
N(0, Lambda Lambda' + diag(Psi)). Drawing \code{nf - 1 + p} standard normals and
post-multiplying by the factor-score matrix is faster than forming the model-
implied correlation matrix and drawing from it, and matches the position at which
efa_nest() reads the reference eigenvalue.
}
\keyword{internal}
