neighbayes.dgp.simulate_sar_poisson_flow¶
-
neighbayes.dgp.simulate_sar_poisson_flow(n=
None, rho_d=0.3, rho_o=0.2, rho_w=0.1, mean_count=8.0, signal=0.3, seed=42, *, T=None, pair_effects=None, time_effects=False, separable=False, pair_effect_sd=None, time_effect_sd=None, **kwargs)[source]¶ Generate synthetic O-D flow counts from a Poisson SAR flow DGP.
\[y_{ij} \sim \operatorname{Poisson}(\mu_{ij}), \qquad \log \boldsymbol{\mu} = A(\rho_d, \rho_o, \rho_w)^{-1} X\beta\]- Parameters:¶
- n : int, optional¶
Approximate number of spatial units (
N = n^2flows).- rho_d : float¶
Destination, origin and cross spatial parameters.
- rho_o : float¶
Destination, origin and cross spatial parameters.
- rho_w : float¶
Destination, origin and cross spatial parameters.
- mean_count : float, default 8.0¶
Target mean of the simulated counts.
- signal : float, default 0.3¶
Magnitude of the regression coefficients, which sets the spread of
eta. The default givessd(eta) ~ 1and roughly 5-10% zeros. Larger values give heavy-tailed designs with many zeros (signal=0.9:sd(eta) ~ 3, 40-50% zeros, counts in the hundreds), which the Poisson flow samplers recover. An earlier note here said they could not; that was the last-arrival augmentation bug fixed on 2026-10-03, which biased large counts. Sparsity itself is not the obstacle: what limits ρ is the total information, so a lowmean_counton a smallngives a correct but wide posterior (Gibbs matches NUTS there).- seed : int, default 42¶
Random seed.
- **kwargs¶
Forwarded to
simulate_sar_negbin_flow().
- Returns:¶
As
simulate_sar_negbin_flow(), withoutalpha.- Return type:¶