ivxj.within_trans

Functions

within_trans(A, Tlens)

Perform within-group transformation for unbalanced panel data.

Module Contents

ivxj.within_trans.within_trans(A, Tlens)[source]

Perform within-group transformation for unbalanced panel data.

This function applies a within-group transformation to unbalanced panel data by removing individual-specific means from each submatrix.

Parameters:
  • A (2D array-like, dtype=float64) – The full dataset, represented as a panel of stacked submatrices (one for each individual).

  • Tlens (1D array-like, dtype=int) – The lengths of each submatrix (individual time series) in the panel.

Returns:

B – The dataset after applying the within-group transformation, with individual-specific means removed.

Return type:

2D array-like, dtype=float64