bayespecon.dgp.simulate_panel_ols_fe

bayespecon.dgp.simulate_panel_ols_fe(N, T, beta=None, sigma=1.0, sigma_alpha=0.5, err_hetero=False, rng=None, seed=None, W=None, gdf=None, contiguity='queen', create_gdf=False, geometry_type='polygon', wide=False)[source]

Simulate pooled data compatible with OLSPanelFE model assumptions.

Parameters:
N : int

Number of units and time periods.

T : int

Number of units and time periods.

beta : np.ndarray, optional

Coefficients including intercept.

sigma : float, default=1.0

Idiosyncratic noise scale.

sigma_alpha : float, default=0.5

Unit effect scale used in simulation.

err_hetero : bool, default=False

If True, generate heteroskedastic innovations with observation-specific standard deviations \(\sigma_i = \sigma \sqrt{1 + \|x_{it}\|^2}\) per period.

rng=None

Random state controls.

seed=None

Random state controls.

W=None

Optional spatial structure accepted for API consistency. For OLS this is returned but not used in the data equation.

gdf=None

Optional spatial structure accepted for API consistency. For OLS this is returned but not used in the data equation.

contiguity='queen'

Optional spatial structure accepted for API consistency. For OLS this is returned but not used in the data equation.

Returns:

Keys: y, X, unit, time, W_dense, W_graph, params_true.

Return type:

dict