View source: R/PDMIFCLUSTGLM.R
PDMIFCLUSTGLM | R Documentation |
Under a pre-specified number of groups and the number of common factors, this function implements clustering for N individual units by nonlinear heterogeneous panel data models with interactive effects. Exponential family of distributions are used Each of individuals in the group are subject to the group-specific unobserved common factors.
PDMIFCLUSTGLM(X, Y, FAMILY, NLfactors, Maxit = 100, tol = 0.001)
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. |
FAMILY |
A description of the error distribution and link function to be used in the model just like in glm functions. |
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. |
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.
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.
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.
fit <- PDMIFCLUSTGLM(data6X,data6Y,binomial(link=logit),c(1,1,1),3,0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.