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

View source: R/M3.select.R

M3.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

M3.select(
  X,
  scale = F,
  rmax = 8,
  method = c("GER3", "GGR3", "JJR3"),
  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: "GER3" and "GGR3", Lu et al.(2021)'s GER3 and GGR3 estimators; "JJR3", Jondeau et al.(2018)'s threshold approach.

modified

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

L

An integer. Maximum iteration for JJR3 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
M3.select(data,method = "GER3")

GuanglinHuang/HOFA documentation built on Sept. 4, 2023, 10:23 p.m.