PPC_new: Center-then-PCA: Projection on the Orthogonal Complement of the Mean Vector
Description
This function performs a specific type of Projected PCA where the data is projected onto
the orthogonal complement of the mean vector. It effectively applies the centering projection
\(P = I - (1/n)J\) (where \(J\) is the all-ones matrix), optionally rescales the columns,
and then performs PCA on the covariance matrix. This allows estimation of factor loadings and
residual variances after removing the mean structure.
Usage
PPC_new(data, m)
Value
A list containing:
Apro
Estimated factor loading matrix (p x m).
Dpro
Estimated residual variances (p x p diagonal matrix).
Sigmahatpro
Covariance matrix of the projected data.
Arguments
data
A matrix or data frame of input data (n x p).
m
Integer. The number of principal components (factors) to keep.
# Examples should be fast and reproducible for CRAN checksset.seed(1)
dat <- matrix(stats::rnorm(200), ncol = 4)
ans <- PPC_new(data = dat, m = 2)
str(ans)
head(ans$Apro)