View source: R/predictive_interval.R
predictive_interval.blrmfit | R Documentation |
Posterior predictive intervals of the model.
## S3 method for class 'blrmfit'
predictive_interval(object, prob = 0.95, newdata, ...)
object |
fitted model object |
prob |
central probability mass to report, i.e. the quantiles 0.5-prob/2 and 0.5+prob/2 are displayed. Multiple central widths can be specified. |
newdata |
optional data frame specifying for what to predict;
if missing, then the data of the input model |
... |
not used in this function |
Reports for each row of the input data set the predictive interval according to the fitted model.
Matrix with as many rows as the input data set and two
columns which contain the lower and upper quantile
corresponding to the central probability mass prob
for
the number of responses of the predictive distribution.
## Setting up dummy sampling for fast execution of example
## Please use 4 chains and 100x more warmup & iter in practice
.user_mc_options <- options(
OncoBayes2.MC.warmup = 10, OncoBayes2.MC.iter = 20, OncoBayes2.MC.chains = 1,
OncoBayes2.MC.save_warmup = FALSE
)
example_model("single_agent", silent = TRUE)
predictive_interval(blrmfit)
## Recover user set sampling defaults
options(.user_mc_options)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.