Canonical Correlation Estimation
CCA(y, rmax = 8, r0 = NULL, r = NULL, localfactor = FALSE, method = "CCD", type = "IC3")
the estimated number of the global factors.
the estimated number of the local factors.
the estimated global factors.
the estimated local factors.
a list consisting of the estimated global factor loadings.
a list consisting of the estimated local factor loadings.
a list consisting of the residuals.
the threshold used in determining the number of global factors, only for method = "MCC"
.
a list of the observation data, each element is a data matrix of each group with dimension \(T * N_m\).
the maximum factor numbers of all groups.
the number of global factors, default is NULL
, the algorithm will automatically estimate the number of global factors. If you have the prior information about the true number of global factors, you can set it by your own.
the number of local factors in each group, default is NULL
, the algorithm will automatically estimate the number of local factors. If you have the prior information about the true number of local factors, you can set it by your own, notice it should be an integer vector of length \(M\) (the number of groups).
if localfactor = FALSE
, then we would not estimate the local factors; if localfactor = TRUE
, then we will further estimate the local factors.
the method used in the algorithm, default is CCD
, it can also be MCC
.
the method used in estimating the factor numbers in each group initially, default is IC3
.
Choi, I., Lin, R., & Shin, Y. (2021). Canonical correlation-based model selection for the multilevel factors. Journal of Econometrics.
dat = gendata()
dat
CCA(dat$y, rmax = 8, localfactor = TRUE, method = "CCD")
CCA(dat$y, rmax = 8, localfactor = TRUE, method = "MCC")
Run the code above in your browser using DataLab