Learn R Programming

trialr (version 0.1.6)

n_at_dose: Get the number of patients treated at the doses under investigation.

Description

Get the number of patients treated at the doses under investigation.

Usage

n_at_dose(x, dose, ...)

# S3 method for dose_finding_fit n_at_dose(x, dose = NULL, ...)

Value

integer 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
target <- 0.2
fit <- stan_crm('1N 2N 3T', skeleton = c(0.1, 0.2, 0.35, 0.6),
                 target = target, model = 'empiric', beta_sd = sqrt(1.34),
                 seed = 123)
n_at_dose(fit)            # c(1, 1, 1, 0)
n_at_dose(fit, dose = 3)  # 1
}

Run the code above in your browser using DataLab