Learn R Programming

trialr (version 0.0.7)

efftox_superiority: Get dose-superiority matrix in EffTox

Description

Get a dose-superiority matrix from an EffTox dose analysis. EffTox seeks to choose the dose with the highest utility, thus superiority is inferred by posterior utility. The item in row i, col j is the posterior probability that the utility of dose j exceeds that of dose i.

Usage

efftox_superiority(fit)

Arguments

fit

An instance of rstan::stanmodel, derived by sampling an EffTox model. Use stan::sampling(stanmodels$EffTox, data = dat).

Value

n by n matrix, where n is number of doses under investigation. The item in row i, col j is the posterior probability that the utility of dose j exceeds that of dose i.

Examples

Run this code
# NOT RUN {
dat <- efftox_parameters_demo()
dat$num_patients <- 3
dat$eff <- c(0, 1, 1)
dat$tox <- c(0, 0, 1)
dat$doses <- c(1, 2, 3)
fit <- rstan::sampling(stanmodels$EffTox, data = dat)
sup_mat <- efftox_superiority(fit)
# }

Run the code above in your browser using DataLab