groupedpaneldatamodels.models.su_shi_phillips

Functions

fixed_effects_estimation(y, x, N, T, K, G[, ...])

Internal estimation function for Su, Shi and Phillips (2016) model.

groupedpaneldatamodels.models.su_shi_phillips.fixed_effects_estimation(y, x, N, T, K, G, max_iter=1000, only_bfgs=True, tol=1e-06, use_individual_effects=True, kappa=0.1)[source]

Internal estimation function for Su, Shi and Phillips (2016) model.

Parameters:
  • y (np.ndarray) – Dependent variable, shape (N, T).

  • x (np.array) – Explanatory variables, shape (N, T, K).

  • N (int) – Number of individuals (cross-sectional units).

  • T (int) – Number of time periods.

  • K (int) – Number of explanatory variables.

  • G (int) – Number of groups.

  • max_iter (int, optional) – Maximum number of iterations. Defaults to 1000.

  • only_bfgs (bool, optional) – Only uses BFGS, instead of Nelder-Mead. Defaults to True.

  • tol (float, optional) – Acceptable tolerance before stopping the estimation. Defaults to 1e-6.

  • use_individual_effects (bool, optional) – Enables indvidual effects. Defaults to True.

  • kappa (float, optional) – Penalization parameter. Defaults to 0.1.

Returns:

  • beta: Estimated coefficients for each individual, shape (K, N)

  • mu: Estimated individual fixed effects, shape (N, 1)

  • alpha: Group-level representative coefficients, shape (K, G)

  • resid: Residuals of the model, shape (N, T)

Return type:

tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray]