ESA {esaBcv} | R Documentation |
Estimate Latent Factor Matrix With Known Number of Factors
Description
Estimate the latent factor matrix and noise variance using early stopping alternation (ESA) given the number of factors.
Usage
ESA(Y, r, X = NULL, center = F, niter = 3, svd.method = "fast")
Arguments
Y |
observed data matrix. p is the number of variables and
n is the sample size. Dimension is |
r |
The number of factors to use |
X |
the known predictors of size |
center |
logical, whether to add an intercept term in the model. Default is False. |
niter |
the number of iterations for ESA. Default is 3. |
svd.method |
either "fast", "propack" or "standard".
"fast" is using the |
Details
The model used is
Y = 1 \mu' + X \beta + n^{1/2}U D V' + E \Sigma^{1/2}
where D
and \Sigma
are diagonal matrices, U
and V
are orthogonal and \mu'
and V'
mean _mu transposed_ and _V transposed_ respectively.
The entries of E
are assumed to be i.i.d. standard Gaussian.
The model assumes heteroscedastic noises and especially works well for
high-dimensional data. The method is based on Owen and Wang (2015). Notice that
when nonnull X
is given or centering the data is required (which is essentially
adding a known covariate with all 1
), for identifiability, it's required that
<X, U> = 0
or <1, U> = 0
respectively. Then the method will first make a rotation
of the data matrix to remove the known predictors or centers, and then use
the latter n - k
(or n - k - 1
if centering is required) samples to
estimate the latent factors.
Value
The returned value is a list with components
estSigma |
the diagonal entries of estimated |
estU |
the estimated |
estD |
the estimated diagonal entries of |
estV |
the estimated |
beta |
the estimated |
estS |
the estimated signal (factor) matrix
|
mu |
the sample centers of each variable which is a vector of length
|
References
Art B. Owen and Jingshu Wang(2015), Bi-cross-validation for factor analysis, http://arxiv.org/abs/1503.03515
Examples
Y <- matrix(rnorm(100), nrow = 10) + 3 * rnorm(10) %*% t(rep(1, 10))
ESA(Y, 1)