probFunction: Getting the Prob Function for a Given Model Type

probFunctionR Documentation

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 signature 'GeneralModel'
probFunction(model, ...)

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

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

Arguments

model

(GeneralModel or ModelTox)
the model.

...

model specific parameters.

grade

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

Value

A prob() function that computes toxicity probabilities.

Functions

  • probFunction(GeneralModel): Return a probability function for a GeneralModel.

  • probFunction(ModelTox): Return a probability function for a ModelTox.

  • probFunction(LogisticLogNormalOrdinal): Return a grade-specific probability function for a LogisticLogNormalOrdinal model.

See Also

prob(), doseFunction().

Examples

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)

crmPack documentation built on July 5, 2026, 9:06 a.m.