utilities.simulate_data()

Simulate mixed-frequency data with regional panels and macro indicators.

Usage

utilities.simulate_data(
    T=80,
    R=6,
    J=3,
    n_factors=2,
    n_macro=2,
    seed=42,
)

Parameters

T: int = 80

Number of quarterly time periods.

R: int = 6

Number of regions.

J: int = 3

Number of regional covariate panels.

n_factors: int = 2

Number of latent factors.

n_macro: int = 2

Number of macro indicator series.

seed: int = 42

Random seed for reproducibility.

Returns

tuple: tuple[
    npt.NDArray[np.float64],
    npt.NDArray[np.float64],
    npt.NDArray[np.float64],
    list[npt.NDArray[np.float64]],
    npt.NDArray[np.float64],
]

(y_uk, y_annual, y_reg_true, Z_panel, macro) — national quarterly growth (T,), annual regional growth (T, R) with NaNs, true quarterly regional growth (T, R), regional covariate panels (list of J arrays each (T, R)), and macro series (T, M).