Description Usage Arguments Value Author(s) References Examples
View source: R/factorcpt_main.R
Estimates the components of the factor structure for an input time series, such as loadings and factors, as well as estimating the number of factors.
1 2 |
x |
input time series matrix, with each row representing a time series |
max.q |
see |
q |
the number of factors; if |
bn |
if |
bn.op |
an index number for the information criterion-based estimator of Bai and Ng (2002);
the default value |
normalisation |
if |
lam |
an |
f |
a |
norm.x |
if |
q.hat |
estimated number of factors |
max.q |
the maximum factor number used for factor number estimation |
ic |
information criterion values computed at a range of factor numbers from |
Haeran Cho
J. Bai and S. Ng (2002) Determining the number of factors in approximate factor models. Econometrica. 70: 191-221.
M. Barigozzi, H. Cho and P. Fryzlewicz (2016) Simultaneous multiple change-point and factor analysis for high-dimensional time series, Preprint.
1 2 3 4 5 6 7 8 9 10 11 12 | n <- 50; T <- 200
e <- matrix(rnorm(n*T), nrow=n) # idiosyncratic components
r <- 3 # factor number
Lam <- matrix(rnorm(n*r, 1, 1), nrow=n) # loadings
f <- matrix(rnorm(r*T), nrow=r) # factors
chi <- e*0 # common component
chp <- T/2 # change-point
chi <- Lam%*%f
x <- chi + sqrt(r)*e
gfm <- get.factor.model(x)
gfm$q.hat
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.