Learn R Programming

crmPack (version 2.0.0)

probFunction: Getting the Prob Function for a Given Model Type

Description

[Experimental]

A function that returns a prob() function that computes the toxicity probabilities for a given dose level, based on the model specific parameters.

Usage

probFunction(model, ...)

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

# S4 method for ModelTox probFunction(model, ...)

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

Value

A prob() function that computes toxicity probabilities.

Arguments

model

(GeneralModel or ModelTox)
the model.

...

model specific parameters.

grade

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

Functions

  • probFunction(GeneralModel):

  • probFunction(ModelTox):

  • probFunction(LogisticLogNormalOrdinal):

See Also

prob(), doseFunction().

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
)

prob_fun <- probFunction(my_model, alpha0 = 2, alpha1 = 3)
prob_fun(30)
ordinal_data <- .DefaultDataOrdinal()
ordinal_model <- .DefaultLogisticLogNormalOrdinal()
opts <- .DefaultMcmcOptions()
samples <- mcmc(ordinal_data, ordinal_model, opts)

probFunction(
  ordinal_model,
  grade = 2L,
  alpha2 = samples@data$alpha1,
  beta = samples@data$beta
)(50)

Run the code above in your browser using DataLab