| doseFunction | R Documentation |
A function that returns a dose() method that computes the dose reaching a
specific target value of a given independent variable, based on the model
specific parameters.
doseFunction(model, ...)
## S4 method for signature 'GeneralModel'
doseFunction(model, ...)
## S4 method for signature 'ModelPseudo'
doseFunction(model, ...)
## S4 method for signature 'LogisticLogNormalOrdinal'
doseFunction(model, grade, ...)
model |
( |
... |
model specific parameters. |
grade |
( |
A dose() method that computes doses.
doseFunction(GeneralModel):
doseFunction(ModelPseudo):
doseFunction(LogisticLogNormalOrdinal):
dose(), probFunction().
my_model <- LogisticLogNormal(
mean = c(-0.85, 1),
cov = matrix(c(1, -0.5, -0.5, 1), nrow = 2),
ref_dose = 50
)
dose_fun <- doseFunction(my_model, alpha0 = 2, alpha1 = 3)
dose_fun(0.6)
data_ordinal <- .DefaultDataOrdinal()
model <- .DefaultLogisticLogNormalOrdinal()
options <- .DefaultMcmcOptions()
suppressWarnings({
samples <- mcmc(data_ordinal, model, options)
})
doseFunction(
model,
alpha1 = samples@data$alpha2,
beta = samples@data$beta,
grade = 1L
)(x = 0.75)
doseFunction(
model,
alpha2 = samples@data$alpha2,
beta = samples@data$beta,
grade = 2L
)(x = 0.25)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.