get.factor.model: Factor model estimation via Principal Component Analysis

Description Usage Arguments Value Author(s) References Examples

View source: R/package.R

Description

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.

Usage

1
2
get.factor.model(x, max.q = NULL, q = NULL, bn = TRUE,
              bn.op = 2, normalisation = TRUE)

Arguments

x

input time series matrix, with each row representing a time series

max.q

see max.q in factor.seg.alg

q

the number of factors; if bn=FALSE, q needs to be given

bn

if bn=TRUE, the factor number is estimated using the information criterion-based estimator of Bai and Ng (2002)

bn.op

an index number for the information criterion-based estimator of Bai and Ng (2002); the default value bn.op=2 is used in Barigozzi, Cho & Fryzlewicz (2016)

normalisation

if normalisation=TRUE, each row x is standardised prior to PCA

Value

lam

an n-by-(min(n, T)-1) matrix containing the estimated loadings

f

a (min(n, T)-1)-by-T matrix containing the estimated factors

norm.x

if normalisation=TRUE, row-wise standardised x; else norm.x=x

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 0 to max.q

Author(s)

Haeran Cho

References

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.

Examples

 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

Example output

[1] 3

factorcpt documentation built on May 2, 2019, 8:15 a.m.