Learn R Programming

crmPack (version 2.0.0)

doseFunction: Getting the Dose Function for a Given Model Type

Description

[Experimental]

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.

Usage

doseFunction(model, ...)

# S4 method for GeneralModel doseFunction(model, ...)

# S4 method for ModelPseudo doseFunction(model, ...)

# S4 method for LogisticLogNormalOrdinal doseFunction(model, grade, ...)

Value

A dose() method that computes doses.

Arguments

model

(GeneralModel or ModelPseudo)
the model.

...

model specific parameters.

grade

(integer)
the toxicity grade for which the dose function is required

Functions

  • doseFunction(GeneralModel):

  • doseFunction(ModelPseudo):

  • doseFunction(LogisticLogNormalOrdinal):

See Also

dose(), probFunction().

Examples

Run this code
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)

Run the code above in your browser using DataLab