Learn R Programming

trialr (version 0.0.7)

efftox_process: Process RStan samples from an EffTox model

Description

Process RStan samples from an EffTox model to make inferences about dose-acceptability, dose-utility and which dose should be recommended next.

Usage

efftox_process(dat, fit)

Arguments

dat

An instance of efftox_params, a list of EffTox parameters. An example is yielded by efftox_parameters_demo.

fit

An instance of rstan::stanmodel, derived by fitting the trialr EffTox model.

Value

An instance of efftox_fit.

See Also

efftox_params

efftox_parameters_demo

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)
decision <- efftox_process(dat, fit)
decision$recommended_dose == 3
# }

Run the code above in your browser using DataLab