M4.select: Determine the number of non-Gaussian and Gaussian factors in...

View source: R/M4.select.R

M4.selectR Documentation

Determine the number of non-Gaussian and Gaussian factors in hofa

Description

Determine the number of non-Gaussian and Gaussian factors in hofa

Usage

M4.select(
  X,
  scale = F,
  rmax = 8,
  method = c("GER4", "GGR4", "JJR4"),
  modified = F,
  L = 100,
  ...
)

Arguments

X

A matrix or data frame with t rows (samples) and n columns (variables).

scale

logical. If TRUE, the variance of columns of X are normalized to 1 before Factor Number test.

rmax

The maximum number of factors.

method

Method to use: "GER4" and "GGR4", Lu et al.(2021)'s GER4 and GGR4 estimators; "JJR4", Jondeau et al.(2018)'s threshold approach.

modified

logical. Only available for "GER4" and "GGR4". If TRUE, we use modified estimators which can test zero factor.

L

An integer. Maximum iteration for JJR4 approach, default to 100.

...

Any other parameters.

Value

The number of non-Gaussian and Gaussian factors determined by selected approach.

Examples

n = 100
t = 200
k = 2
par_f = list(rep(1,k),rep(0.8,k),rep(1,k),rep(Inf,k))
par_e = list(1,0,2,Inf)
rho_f = c(0.5,0.2)
par_cove = list(beta = 0.2,J = n/10,rho = 0.2,msig_e = c(1,5))
data = hofa.DGP2(n,t,k,par_f,par_e,par_cove,rho_f)$X
M4.select(data,method = "GER4")

GuanglinHuang/hofa documentation built on Sept. 3, 2023, 7:01 a.m.