groupedpaneldatamodels.models.su_ju
Functions
|
Internal function to estimate the interactive effects model as described by Su and Ju (2018). |
- groupedpaneldatamodels.models.su_ju.interactive_effects_estimation(y: ndarray, x: ndarray, N: int, T: int, K: int, G: int, R: int, max_iter: int = 1000, only_bfgs: bool = True, tol: float = 1e-06, kappa: float = 0.1)[source]
Internal function to estimate the interactive effects model as described by Su and Ju (2018).
- Parameters:
y (np.ndarray) – Dependent variable, shape (N, T, 1).
x (np.ndarray) – 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.
R (int) – Number of common factors (global).
max_iter (int, optional) – Maximum number of acceptable iterations, may be too large. Defaults to 1000.
only_bfgs (bool, optional) – Only uses BFGS. Defaults to True.
tol (float, optional) – Acceptable tolerance for the stopping condition. Defaults to 1e-6.
kappa (float, optional) – Kappa penalty parameter. Defaults to 0.1.
- Returns:
beta: Estimated coefficients for each individual, shape (K, N)
alpha: Ordered group-level representative coefficients, shape (K, G)
lambdas: Factor loadings, shape (R, N)
factors: Common factors, shape (T, R)
resid: Residuals of the model, shape (N, T)
- Return type:
tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray]