% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sep.exp.test.R
\name{sep.exp.power}
\alias{sep.exp.power}
\title{Empirical power of the test based on the separable expansion the sample core under Gaussian populations}
\usage{
sep.exp.power(
  n,
  p1,
  p2,
  sigma,
  alpha = 0.05,
  center = TRUE,
  null.samp.num = 1000,
  alt.samp.num = 1000,
  iter = 10
)
}
\arguments{
\item{n}{the sample size.}

\item{p1}{the row dimension.}

\item{p2}{the column dimension.}

\item{sigma}{the population covariance matrix.}

\item{alpha}{the level of the test.}

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

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

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

\item{iter}{the unit number at which to print the number of current iterations; 10 by default.}
}
\value{
\code{sep.exp.power} returns a list of the following elements:
\describe{
\item{alt.stat}{the vector of \code{alt.samp.num} Monte-Carlo simulated test statistics under \eqn{N_{p_1 \times p_2}(0, \code{sigma})} after some transformation;}
\item{null.stat}{the vector of \code{null.samp.num} Monte-Carlo simulated test statistics under the null after some transformation;}
\item{para.pval}{the vector of p-values for each test statistic in \code{alt.stat} evaluated based on Monte-Carlo approximated empirical null distribution (\code{null.stat});}
\item{para.power}{the proportion of the p-values in \code{para.pval} smaller than \code{alpha};}
}
}
\description{
Evaluate the empirical power of the test based on the separable expansion of the sample core \eqn{\hat{ C }} with \eqn{n} i.i.d. random matrices generated according to \eqn{N_{p_1 \times p_2} (0, \Sigma)} with given \eqn{\Sigma} (specified in \code{sigma}).
The test statistic is given by \eqn{T(Y) = || \hat{C} ||_F^2/p-1}. The power is evaluated with respect to \eqn{nT(Y)-p-1}.
Given a level \eqn{\alpha \in (0,1)} (specified in \code{alpha}), the parametric power is evaluated. To this end, the p-value (\code{para.pval}) is first evaluated for each test statistic by comparing it to the Monte-Carlo approximated null distribution (\code{null.stat}).
Then the power (\code{para.power}) is evaluated as the proportion of these p-values smaller than \eqn{\alpha}. For details, see Section 5.2 of Sung and Hoff (2025).
If the mean is assumed to be known, you may not center the data (\code{center=FALSE}). Otherwise, you should center the data (\code{center=TRUE}).
}
\examples{
p1=12; p2=10; r=4; n=100

set.seed(100)
para.list=pi.rank_r.core(p1,p2,r,lambda.gen=FALSE)
Sigma=pi.core(para.list,lambda0=0.98)

sep.exp.power(n,p1,p2,Sigma,center=FALSE,null.samp.num=20,alt.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
}
