Usage
factor.seg.alg(x, r=NULL, bn.op=2, sig.lev=.05, max.q=NULL, q.seq=NULL, qlen=5, qby=0, dw=NULL, p=NULL, B=200, scales=NULL, rule=NULL, mby=NULL, tby=NULL, idio.diag=FALSE, do.parallel=TRUE, no.proc=2)
Arguments
x
input time series matrix, with each row representing a time series
r
the number of factors, if r=NULL
, screening over a range of factor number candidates
is performed as described in the paper
bn.op
an index number for the information criterion-based estimator of Bai and Ng (2002)
for the number of factors, the default value bn.op=2
is used in Barigozzi, Cho & Fryzlewicz (2016)
sig.lev
sets the level of significance for drawing the bootstrap-based threshold
max.q
the maximum number of factors, if max.q=NULL
, a default value is chosen as described in the paper
q.seq
a vector of factor number candidates; if q.seq=NULL
, it is chosen as described in
Barigozzi, Cho & Fryzlewicz (2016) using qlen
or qby
qlen
specifies the length of the sequence of factor number candidates
qby
specifies the increment of the sequence of factor number candidates when qlen=0
;
if both qlen=0
and qby=0
, the sequence of factor number candidates is generated
as if qby=1
dw
trims off the interval of consideration in the binary segmentation algorithm
and determines the minimum length of a stationary segment;
if dw=NULL
, a default value is chosen as described in the Appendix of
Barigozzi, Cho & Fryzlewicz (2016)
p
inverse of the average length of blocks in the stationary bootstrap procedure,
if p=NULL
, a data-driven value is chosen as described in the Appendix of
Barigozzi, Cho & Fryzlewicz (2016)
B
the number of bootstrap samples for threshold selection
scales
the number of wavelet scales used for wavelet filtering of
the common and idiosyncratic components estimated via PCA
rule
the depth of a binary tree for change-point analysis, see the
Appendix of Barigozzi, Cho & Fryzlewicz (2016)
idio.diag
if idio.diag=TRUE
, only the diagonal wavelet-transform is employed
in order to generate the panel of statistics from the idiosyncratic components
do.parallel
if do.parallel=TRUE
, a set of copies of R running in parallel are created
and used for bootstrap procedure
no.proc
sets the number of processes to be spawned when do.parallel=TRUE
,