This function is one of the main functions the package, employing the generalized canonical correlation estimation for both the global factors \(\boldsymbol{G}\) and, when not explicitly provided, for the number of global factors \(r_{0}\). Typically, this function is intended for internal purposes. Users can opt for [GCC()] instead of [multilevel()], if they only need to estimate the number of global factors.
GCC(
data,
ic = "BIC3",
standarise = TRUE,
r_max = 10,
overestimate = TRUE,
depvar_header = NULL,
i_header = NULL,
j_header = NULL,
t_header = NULL,
r0 = NULL,
ri = NULL
)A list containing the estimated number of global factors \(\hat{r}_{0}\), the global factors \(\widehat{\boldsymbol{G}}\), and the other elements that are used in multilevel().
Either a data.frame or a list of data matrices of length \(R\). See Details.
A character string of selection criteria to use for estimation of the numbers of local factors. See Details.
A logical indicating whether the data is standardised before estimation or not. See Details.
An integer indicating the maximum number of factors allowed. See Details.
A logical. True means \(r_{\max}\) factors are extracted from each block. See Details.
A character string specifying the header of the dependent variable. See Details.
A character string specifying the header of the block identifier. See Details.
A character string specifying the header of the individual identifier. See Details.
A character string specifying the header of the time identifier. See Details.
An integer of the number of global factors. See Details.
An array of length \(R\) containing the number of local factors in each block. See Details.
The user-supplied data.frame should contain at least four columns, namely the dependent variable (\(y_{ijt}\)), block identifier (\(i\)), individual identifier (\(j\)), and time (\(t\)). The user needs to supply their corresponding headers in the data.frame to the function using the parameters "depvar_header", "i_header", "j_header", and "t_header", respectively. If the data is supplied as a list, these arguments will not be used.
If either r0 = NULL or ri = NULL, both of them will be estimated. In such case, "r_max" must be supplied. If "r0" and "ri" are supplied then "r_max" is not needed and will be ignored. If overestimate = TRUE, then \(r_{\max}\) factors are extracted from each block. Otherwise, \(\hat{d}_{i}\) will be estimated respectively from each block merely using "r_max" as the upper search limit.
If standarise = TRUE, each time series will be standardised so it has zero mean and unit variance.
Lin, R. and Shin, Y., 2025. Generalised Canonical Correlation Estimation of the Multilevel Factor Model. Available at SSRN 4783804.
panel <- UKhouse # load the data
Y_list <- panel2list(panel, depvar_header = "dlPrice", i_header = "Region",
j_header = "LPA_Type", t_header = "Date")
est_GCC <- GCC(Y_list, r_max = 10)
r0_hat <- est_GCC$r0 # number of global factors
G_hat <- est_GCC$G # global factors
Run the code above in your browser using DataLab