You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then we can simply generate samples from the posterior predictive distribution. Observe we need to "rewrite" the generative graph to include the conditioned transition step. When you call {meth}`~pm.sample_posterior_predictive`,PyMC will attempt to match the names of random variables in the active model context to names in the provided `idata.posterior`. If a match is found, the specified model prior is ignored, and replaced with draws from the posterior. This means we can put any prior we want on these parameters, because it will be ignored. We choose {class}`~pymc.distributions.continuous.Flat` because you cannot sample from it. This way, if PyMC does not find a match for one of our priors, we will get an error to let us know something isn't right. For a detailed explanation on these type of cross model predictions, see the great blog post [Out of model predictions with PyMC](https://www.pymc-labs.com/blog-posts/out-of-model-predictions-with-pymc/).
@@ -351,8 +351,8 @@ with pm.Model(coords=coords, check_bounds=False) as conditional_model:
351
351
rho = pm.Flat(name="rho", dims=("lags",))
352
352
sigma = pm.Flat(name="sigma")
353
353
354
-
ar_innov = pm.CustomDist(
355
-
"ar_dist",
354
+
ar_steps = pm.CustomDist(
355
+
"ar_steps",
356
356
y_data,
357
357
rho,
358
358
sigma,
@@ -361,7 +361,7 @@ with pm.Model(coords=coords, check_bounds=False) as conditional_model:
0 commit comments