ivxj.delete_period_obs
Functions
|
Delete h observations from the start or end of each submatrix. |
Module Contents
- ivxj.delete_period_obs.delete_period_obs(A, Tlens, h, fromStart=True)[source]
Delete h observations from the start or end of each submatrix.
This function removes the first h observations from each submatrix in unbalanced panel data to create a lag effect. If fromStart is set to False, the function will delete the last h observations instead.
- Parameters:
A (1D array-like, dtype=float64) – The full dataset, represented as a stacked 1D array.
Tlens (1D array-like, dtype=int) – The lengths of each submatrix (individual time series) in the panel.
h (int) – The number of observations to delete from each submatrix.
fromStart (bool, default=True) – If True, delete the first h observations; if False, delete the last h observations.
- Returns:
B – The dataset after deleting h observations from each submatrix.
- Return type:
2D array-like, dtype=float64