plot_pptest | R Documentation |
Given posterior predictive samples at X_test
,
plot the point and interval estimates and compare
to the actual testing data y_test
.
plot_pptest(post_ypred, y_test, alpha_level = 0.1)
post_ypred |
|
y_test |
|
alpha_level |
alpha-level for prediction intervals |
plot of the testing data, point and interval predictions, and a summary of the empirical coverage
# Simulate some data:
dat = simulate_tlm(n = 100, p = 5, g_type = 'step')
# Fit a semiparametric Bayesian linear model:
fit = sblm(y = dat$y, X = dat$X, X_test = dat$X_test)
# Evaluate posterior predictive means and intervals on the testing data:
plot_pptest(fit$post_ypred, dat$y_test,
alpha_level = 0.10) # coverage should be about 90%
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.