Learn R Programming

GrFA (version 0.2.2)

GCC: Generalised Canonical Correlation

Description

Generalised Canonical Correlation Estimation for Group Factor Model.

Usage

GCC(y, rmax = 8, r0 = NULL, r = NULL, localfactor = FALSE, type = "IC3")

Value

An object of class "GFA" containing:

r0hat

The estimated number of global factors.

rhat

The estimated number of local factors (if localfactor = TRUE).

rho

The ratio of the singular values used to estimate the number of global factors.

Ghat

The estimated global factors.

Fhat

The estimated local factors (if localfactor = TRUE).

loading_G

A list consisting of the estimated global factor loadings.

loading_F

A list consisting of the estimated local factor loadings (if localfactor = TRUE).

residual

A list consisting of the residuals (if localfactor = TRUE).

Arguments

y

A list of the observation data, each element is a data matrix of each group with dimension \(T \times N_m\).

rmax

The maximum factor numbers of all groups. Default is 8.

r0

The number of global factors. Default is NULL, the algorithm will automatically estimate the number of global factors. If you have prior information about the true number of global factors, you can set it manually.

r

The number of local factors in each group. Default is NULL, the algorithm will automatically estimate the number of local factors. If you have prior information, set it manually as an integer vector of length \(M\) (the number of groups).

localfactor

Logical. If FALSE (default), local factors are not estimated. If TRUE, local factors will be estimated.

type

The method used in estimating the factor numbers in each group initially. Default is "IC3".

References

Lin, R., & Shin, Y. (2023). Generalised Canonical Correlation Estimation of the Multilevel Factor Model. Available at SSRN 4295429.

Examples

Run this code
dat <- GrFA::gendata()
GCC(dat$y, rmax = 8, localfactor = TRUE)

Run the code above in your browser using DataLab