pypomp.PanelPomp.simulate¶
- PanelPomp.simulate(key: Array, theta: PanelParameters | None = None, times: Array | None = None, nsim: int = 1, as_pomp: bool = False) tuple[DataFrame, DataFrame] | object¶
Simulate latent states and observations from the panel model.
- Parameters:
key (jax.Array) – JAX random key.
theta (PanelParameters or None, optional) – Parameters to simulate from. If
None, defaults toself.theta.times (jax.Array or None, optional) – Times at which to simulate the model. If
None, defaults to the times coordinate of the data.nsim (int, optional) – Number of simulations to run per replicate. Defaults to
1.as_pomp (bool, optional) – If
True, return a newPanelPompobject containing the simulated observations for the first parameter replicate and simulation index. Defaults toFalse.
- Returns:
If
as_pomp=False, returns a tuple(X_sims, Y_sims)of dataframes in long format. Ifas_pomp=True, returns a deep copy of the original panel model with simulated observations.- Return type:
tuple of (pd.DataFrame, pd.DataFrame) or PanelPomp