R/weights_at_dose.R
weights_at_dose.Rd
Get the weights of patient outcomes at the doses under investigation.
weights_at_dose(x, dose, ...) # S3 method for default weights_at_dose(x, dose = NULL, ...) # S3 method for crm_fit weights_at_dose(x, dose = NULL, ...)
x | An R object of class |
---|---|
dose | Optional integer, at which dose-level? Omit to get data on all doses. |
... | arguments passed to other methods |
list if dose
omitted, numerical vector if dose
provided.
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)) l <- weights_at_dose(fit) length(l) # 4 l[[1]] # c(1, 1) l[[2]] # c(0.9, 0.1, 0.1) l[[3]] # c() weights_at_dose(fit, dose = 2) # c(0.9, 0.1, 0.1) }