Skip to content

Instantly share code, notes, and snippets.

@MJacobs1985
Last active December 11, 2021 09:29
Show Gist options
  • Select an option

  • Save MJacobs1985/4257368880e8f14a3b37fab5934db151 to your computer and use it in GitHub Desktop.

Select an option

Save MJacobs1985/4257368880e8f14a3b37fab5934db151 to your computer and use it in GitHub Desktop.
predictions <- posterior_predict(model2, newdata = d)
ppc_intervals(d$ADG,
yrep = predictions,
x = d$ADF,
prob = 0.5, prob_outer = 0.95)
prediction_summary(model2, data = d)
cv_procedure <- prediction_summary_cv(model = model2,
group = "Studycode",
data = d,
k = 10)
cv_procedure$cv
model_elpd <- loo(model2, save_psis = TRUE)
print(model_elpd)
model_elpd$estimates
plot(model_elpd)
yrep <- posterior_predict(model2)
ppc_loo_pit_overlay(
y = d$ADG,
yrep = yrep,
lw = weights(model_elpd$psis_object)
)
ppc_loo_pit_qq(
y = d$ADG,
yrep = yrep,
lw = weights(model_elpd$psis_object)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment