efficacy | R Documentation |
A function that computes the value of expected efficacy at a specified dose level, based on the model specific parameters. The model parameters (samples) are obtained based on prior specified in form of pseudo data combined with observed responses (if any).
efficacy(dose, model, samples, ...)
## S4 method for signature 'numeric,Effloglog,Samples'
efficacy(dose, model, samples)
## S4 method for signature 'numeric,Effloglog,missing'
efficacy(dose, model)
## S4 method for signature 'numeric,EffFlexi,Samples'
efficacy(dose, model, samples)
dose |
( |
model |
( |
samples |
( |
... |
model specific parameters when |
The efficacy()
function computes the expected efficacy for given
doses, using samples of the model parameter(s).
If you work with multivariate model parameters, then assume that your model
specific efficacy()
method receives a samples matrix where the rows
correspond to the sampling index, i.e. the layout is then
ā nSamples x dimParameterā
.
A numeric
vector with the values of expected efficacy.
If non-scalar samples
were used, then every element in the returned vector
corresponds to one element of a sample. Hence, in this case, the output
vector is of the same length as the sample vector. If scalar samples
were
used or no samples
were used, e.g. for pseudo DLE/toxicity model
,
then the output is of the same length as the length of the dose
.
efficacy(dose = numeric, model = Effloglog, samples = Samples)
: compute the expected efficacy at a specified dose level,
based on the samples of Effloglog
model parameters.
efficacy(dose = numeric, model = Effloglog, samples = missing)
: compute the expected efficacy at a specified dose level,
based on the Effloglog
model parameters.
All model parameters (except dose
) should be present in the model
object.
efficacy(dose = numeric, model = EffFlexi, samples = Samples)
: compute the expected efficacy at a specified dose level,
based on the samples of EffFlexi
model parameters. If a given dose in
the dose
vector is from outside of the dose grid range, the NA_real
is
returned for this dose and the warning is thrown.
dose()
, prob()
.
# Obtain the expected efficacy value for a given dose, a given pseudo efficacy
# model (in flexible form for prior) and efficacy samples.
# Empty data (i.e. no observed data), dose grid only.
my_data <- DataDual(doseGrid = seq(25, 300, 25))
my_model <- EffFlexi(
eff = c(1.223, 2.513),
eff_dose = c(25, 300),
sigma2W = c(a = 0.1, b = 0.1),
sigma2betaW = c(a = 20, b = 50),
rw1 = FALSE,
data = my_data
)
my_options <- McmcOptions(
burnin = 100, step = 2, samples = 200, rng_kind = "Mersenne-Twister", rng_seed = 94
)
my_samples <- mcmc(data = my_data, model = my_model, options = my_options)
# Efficacy for dose 75.
efficacy(dose = 75, model = my_model, samples = my_samples)
# Obtain the expected efficacy value for a given dose, a given pseudo efficacy
# model (linear log-log efficacy) and no samples.
my_model_ll <- Effloglog(
eff = c(1.223, 2.513),
eff_dose = c(25, 300),
nu = c(a = 1, b = 0.025),
data = my_data,
const = 0
)
efficacy(dose = 75, model = my_model_ll)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.