% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/partial.isotropy.core.R
\name{pi.rank1.core}
\alias{pi.rank1.core}
\title{Partial-isotropy rank-1 core}
\usage{
pi.rank1.core(p1, lambda.gen = TRUE)
}
\arguments{
\item{p1}{the row and column dimensions.}

\item{lambda.gen}{logical, whether to generate a non-spiked eigenvalue or not.; TRUE by default.}
}
\value{
\code{pi.rank1.core} returns a list with the following elements:
\describe{
\item{K1}{the row covariance matrix of dimension \eqn{p1 \times p1};}
\item{K2}{the column covariance matrix of dimension \eqn{p1 \times p1};}
\item{A}{the factor matrix of a rank-1 core of dimension \eqn{p1 \times p1} ;}
\item{lambda}{If \code{lambda.gen}=TRUE, the non-spiked eigenvalue \eqn{\lambda \in (0,1)}. Otherwise, \code{NULL}.}
}
}
\description{
Randomly generate a list of parameters for the covariance matrix  with a partial-isotropy rank-1 core for square matrix-variate data.
}
\details{
If a core covariance matrix is of rank-1, the data should be a square matrix. Thus, the row and column dimensions must coincide.
The covariance matrix \eqn{\Sigma} with a partial-isotropy rank-1 core takes the form of
\deqn{\Sigma = (K_2 \otimes K_1)^{1/2}((1- \lambda) \mathrm{vec}(A) \mathrm{vec}(A)^\top + \lambda I_{p_1^2})(K_2 \otimes K_1)^{1/2, \top}}
for \eqn{\lambda \in (0,1)}, positive definite matrices \eqn{K_1, K_2} of the same dimensions \eqn{p_1 \times p_1}, and \eqn{A \in \mathbb{R}^{p_1 \times p_1}} such that \eqn{\mathrm{vec}(A) \mathrm{vec}(A)^\top} is a rank-1 core.
Here \eqn{M^{1/2}} denotes either symmetric square root or the Cholesky factor of a positive definite matrix \eqn{M}.
The separable and core components of \eqn{\Sigma}, denoted \eqn{K} and \eqn{C}, are
\deqn{K=K_2\otimes K_1,\quad C=(1- \lambda) \mathrm{vec}(A) \mathrm{vec}(A)^\top + \lambda I_{p_1^2}.}
For the exact formula, see Theorem 1 of Sung and Hoff (2025).
}
\examples{

set.seed(100)
p1=10
pi.rank1.core(p1)

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