PDMIFCLUST {PDMIF} | R Documentation |
PDMIFCLUST
Description
Under a pre-specified number of groups and the number of common factors, this function implements clustering for N individuals in the panels. Each of individuals in the group are subject to the group-specific unobserved common factors.
Usage
PDMIFCLUST(X, Y, NGfactors, NLfactors, Maxit = 100, tol = 0.001)
Arguments
X |
The (NT) times p design matrix, without an intercept where N=number of individuals, T=length of time series, p=number of explanatory variables. |
Y |
The T times N panel of response where N=number of individuals, T=length of time series. |
NGfactors |
A pre-specified number of common factors across groups (see example). |
NLfactors |
A pre-specified number of factors in each groups (see example). |
Maxit |
A maximum number of iterations in optimization. Default is 100. |
tol |
Tolerance level of convergence. Default is 0.001. |
Value
A list with the following components:
Label: The estimated group membership for each of the individuals.
Coefficients: The estimated heterogeneous coefficients.
Lower05: Lower end (5%) of the 90% confidence interval of the regression coefficients.
Upper95: Upper end (95%) of the 90% confidence interval of the regression coefficients.
GlobalFactors: The estimated common factors across groups.
GlobalLoadings: The estimated factor loadings for the common factors.
GroupFactors: The estimated group-specific factors.
GroupLoadings: The estimated factor loadings for each group.
pval: p-value for testing hypothesis on heterogeneous coefficients.
Se: Standard error of the estimated regression coefficients.
References
Ando, T. and Bai, J. (2016) Panel data models with grouped factor structure under unknown group membership Journal of Applied Econometrics, 31, 163-191.
Ando, T. and Bai, J. (2017) Clustering huge number of financial time series: A panel data approach with high-dimensional predictors and factor structures. Journal of the American Statistical Association, 112, 1182-1198.
Examples
fit <- PDMIFCLUST(data5X,data5Y,2,c(2,2,2),20,0.5)