ivxj.gen_ivx
Functions
|
Generate Instrumental Variables for X (IVX) from unbalanced panel data. |
|
Generate Instrumental Variables for X (IVX) for a single time series. |
Module Contents
- ivxj.gen_ivx.gen_ivx(x, rhoz, Tlens)[source]
Generate Instrumental Variables for X (IVX) from unbalanced panel data.
This function generates the IVX tool variables for unbalanced panel data, where the dataset consists of multiple submatrices (x_1, …, x_n) with varying lengths.
- Parameters:
x (2D array-like, dtype=float64) – The full dataset as a panel of stacked submatrices.
rhoz (float) – Parameter used for generating the IVX.
Tlens (1D array-like, dtype=int) – The lengths of each submatrix (individual time series) in the panel.
- Returns:
zta – The generated IVX tool variables for the full dataset.
- Return type:
2D array-like, dtype=float64
- ivxj.gen_ivx.gen_ivx_for_one_time_series(x, rhoz)[source]
Generate Instrumental Variables for X (IVX) for a single time series.
This function generates the IVX tool variable for a given time series, based on the specified IVX generation parameter.
- Parameters:
x (1D array-like, dtype=float64) – The input time series as a column vector.
rhoz (float) – Parameter used for generating the IVX.
- Returns:
z – The generated IVX tool variable for the input time series.
- Return type:
1D array-like, dtype=float64