% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/large.eig.test.R
\name{large.eig.null}
\alias{large.eig.null}
\title{Test statistic based on the largest eigenvalue of the sample core under the null}
\usage{
large.eig.null(
  n,
  p1,
  p2,
  center = TRUE,
  trans = TRUE,
  sigma.known = FALSE,
  samp.num = 1000,
  iter = 10
)
}
\arguments{
\item{n}{the sample size.}

\item{p1}{the row dimension.}

\item{p2}{the column dimension.}

\item{center}{logical, whether to center the data or not; TRUE by default.}

\item{trans}{logical,whether to transform the test statistic to approximate \code{TW}-law or not; TRUE by default.}

\item{sigma.known}{logical, whether to assume the known population covariance matrix or not; FALSE by default. If TRUE, the transformed test statistic is returned, regardless of \code{trans}.}

\item{samp.num}{the number of iterations for the Monte-Carlo simulation; 1000 by default.}

\item{iter}{the unit number at which to print the number of current iterations; 10 by default.}
}
\value{
the vector of \code{samp.num} Monte-Carlo simulated null test statistics based on the largest eigenvalue of the sample core.
}
\description{
Implement the Monte-Carlo simulations of the test statistic based on the largest eigenvalue of the sample core \eqn{\hat{C}} for Gaussian populations as benchmark cases under the null hypothesis of separability.
Here the sample core \eqn{\hat{C}} refers to the core component of the sample covariance matrix \eqn{S}.
The test statistic may be transformed to approximate the Tracy-Widom (\code{TW}) law if \code{trans=TRUE}. This transformation is based on the quantities depending only on \eqn{(n,p_1,p_2)}.
If the population covariance matrix under the null is assumed to be known (\code{sigma.known=TRUE}), the transformation is done regardless of \code{trans} based on the Kronecker MLE (the separable component of \eqn{S}).
For the details, see (20) of Sung and Hoff (2025). Unless transformed, the function will return the values of \eqn{\lambda_1 (\hat{C})}.
Also, if the mean is assumed to be known, you may not center the data (\code{center=FALSE}). Otherwise, the data should be centered.
}
\examples{
p1=10; p2=10; n=400
set.seed(100)
large.eig.null(n,p1,p2,center=FALSE,samp.num=20)

}
\references{
Sung, B. and Hoff, P. (2025). Testing Separability of High-Dimensional Covariance Matrices.
arXiv preprint arXiv:2506.17463.
}
\author{
Bongjung Sung
}
