Learn R Programming

OncoBayes2 (version 0.6-0)

summary.blrmfit: Summarise model results

Description

Provides model summaries for blrm_exnex and blrm_trial analyses.

Usage

# S3 method for blrmfit
summary(object, newdata, transform = TRUE,
  prob = 0.95, interval_prob, ...)

Arguments

object

fitted model object

newdata

optional data frame specifying for what to predict; if missing, then the data of the input model object is used

transform

logical (defaults to FALSE) indicating if the linear predictor on the logit link scale is transformed with inv_logit to the 0-1 response scale.

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.

interval_prob

optional vector of sorted quantiles for which the interval probabilities are calculated

...

not used in this function

Value

Returns a data.frame of the key summaries of the posterior mean, standard deviation, central probability interval, median and optional interval probabilities. Each row of the data.frame corresponds to the respective input data which is by default the same data set as used for the blrm_exnex analysis or the data specified in the newdata argument.

Details

The calculated posterior summaries are returned as a data.frame and contain optional interval probabilites for the specified vector of sorted quantiles. These summaries are calculated on the response scale by default and can be obtained on the link scale when setting transform=FALSE.

Examples

Run this code
# NOT RUN {
## 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)

example_model("single_agent")

## obtain underdosing (0-0.16), target dosing (0.16-0.33) and
## overdosing (0.33-1) probabilities
summary(blrmfit, interval_prob=c(0,0.16,0.33,1))

## Recover user set sampling defaults
options(.user_mc_options)

# }

Run the code above in your browser using DataLab