Learn R Programming

trialr (version 0.1.6)

total_weight_at_dose: Get the total weight of patient outcomes at the doses under investigation.

Description

Get the total weight of patient outcomes at the doses under investigation.

Usage

total_weight_at_dose(x, dose, ...)

# S3 method for default total_weight_at_dose(x, dose = NULL, ...)

Value

numerical vector

Arguments

x

An R object of class "dose_finding_fit"

dose

Optional integer, at which dose-level? Omit to get data on all doses.

...

arguments passed to other methods

Examples

Run this code
if (FALSE) {
# CRM example
fit <- stan_crm(skeleton = c(0.1, 0.2, 0.35, 0.6), target = 0.2,
                model = 'empiric', beta_sd = sqrt(1.34), seed = 123,
                doses = c(1, 1, 2, 2, 2),
                tox   = c(0, 0, 0, 0, 0),
                weights = c(1, 1, 0.9, 0.1, 0.1))

total_weight_at_dose(fit)            # c(2, 1.1, 0, 0)
total_weight_at_dose(fit, dose = 2)  # 1.1
}

Run the code above in your browser using DataLab