factor.analysis | R Documentation |
Wrapper for Factor Analysis with potentially high dimensional variables implement in the "cate" R package (Author: Jingshu Wang [aut], Qingyuan Zhao [aut, cre] Maintainer: Qingyuan Zhao <qz280@cam.ac.uk>) that is optimized for the high dimensional problem where the number of samples n is less than the number of variables p.
factor.analysis(Y, r = 1, method = "pc")
Y |
data matrix, a n*p matrix |
r |
number of factors (default, r =1) |
method |
algorithm to be used, "pc" (default) or "ml" |
The two methods extracted from "cate" are quasi-maximum likelihood (ml), and principal component analysis (pc). The ml is iteratively solved the EM algorithm using the PCA solution as the initial value. See Bai and Li (2012) for more details.
a list of objects
estimated factor loadings
estimated latent factors
estimated noise variance matrix
Jushan Bai and Kunpeng Li (2012). Statistical Analysis of Factor Models of High Dimension. The Annals of Statistics, 40 (1), 436-465 <https://doi.org/10.1214/11-AOS966>
Jingshu Wang and Qingyuan Zhao (2020). cate: High Dimensional Factor Analysis and Confounder Adjusted Testing and Estimation. R package version 1.1.1. <https://CRAN.R-project.org/package=cate>
# Nonparanormal(npn) transformation
als.npn <- transformData(alsData$exprs)$data
## pc
pc<- factor.analysis(Y = als.npn, r = 2, method = "pc")
head(pc$Gamma)
head(pc$Z)
head(pc$Sigma)
## ml
ml <- factor.analysis(Y = als.npn, r = 2, method = "ml")
head(ml$Gamma)
head(ml$Z)
head(ml$Sigma)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.