run_one_sim

simulate.run_one_sim(
    dgp=None,
    dgp_args=None,
    *,
    m_iter=2000,
    burn=1000,
    step_rho=0.02,
    a0=1.0,
    b0=1.0,
    seed=None,
    keep_full=False,
    backend='auto',
)

Run one simulation replication: DGP, three estimators, metrics.

Parameters

Name Type Description Default
dgp SimDGP A pre-simulated panel; when omitted, one is generated from dgp_args (which accepts either W or grid=(nrow, ncol), plus the :func:~scspill.simulate.dgp.scspill_sim_dgp arguments; alpha defaults to the paper’s planted weights). None
dgp_args dict Arguments for the DGP when dgp is not given. None
m_iter int MCMC budget for both sampler steps. 2000
burn int MCMC budget for both sampler steps. 2000
step_rho float Random-walk Metropolis step for rho (the R simulation’s fixed step; adaptation is off to mirror the reference study). 0.02
a0 float Inverse-gamma prior for sigma^2. 1.0
b0 float Inverse-gamma prior for sigma^2. 1.0
seed int or numpy.random.SeedSequence Seeds the replication. The DGP (when generated here) and the samplers draw from two independent child streams of this seed, so the simulated data and the MCMC noise are never correlated. None
keep_full bool Keep the draw arrays and per-period paths on the result. False
backend ('auto', 'numpy', 'numba') Sampler kernel backend. "auto"

Returns

Name Type Description
SimRunResult