Factorm: Factor Analysis Model

Description Usage Arguments Value Note Author(s) References See Also Examples

View source: R/hello.R

Description

Factor analysis to extract latent linear factor and estimate loadings.

Usage

1
  Factorm(x, q==NULL)

Arguments

x

a n-by-p matrix, the observed data

q

an integer between 1 and p or NULL, default as NULL and automatically choose q by the eigenvalue ratio method.

Value

return a list with class named fac, including following components:

hH

a n-by-q matrix, the extracted lantent factor matrix.

hB

a p-by-q matrix, the estimated loading matrix.

q

an integer between 1 and p, the number of factor extracted.

sigma2vec

a p-dimensional vector, the estimated variance for each error term in model.

propvar

a positive number between 0 and 1, the explained propotion of cummulative variance by the q factors.

egvalues

a n-dimensional(n<=p) or p-dimensional(p<n) vector, the eigenvalues of sample covariance matrix.

Note

nothing

Author(s)

Liu Wei

References

Fan, J., Xue, L., and Yao, J. (2017). Sufficient forecasting using factor models. Journal of Econometrics.

See Also

factor.

Examples

1
2
3
  dat <- gendata(n = 300, p = 500)
  res <- Factorm(dat$X)
  ccorFun(res$hH, dat$H0) # the smallest canonical correlation

feiyoung/SpagFainfer documentation built on April 4, 2020, 5:20 p.m.