dose: Computing the Doses for a Given Probability, Model and...

Description Usage Arguments Details Value Note See Also Examples

Description

[Stable]

A function that computes the dose reaching a specific target probability of the occurrence of a DLE. The doses are computed based on the samples of the model parameters.

Compute the dose level reaching a specific target probability of the occurrence of a DLE, based on the samples of LogisticIndepBeta model parameters. The LogisticIndepBeta model is a Pseudo DLE (dose-limiting events)/toxicity.

Compute the dose level reaching a specific target probability of the occurrence of a DLE, based on the LogisticIndepBeta model parameters. All model parameters (except prob) should be present in the model object. The LogisticIndepBeta model is a Pseudo DLE (dose-limiting events)/toxicity.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
dose(prob, model, samples, ...)

## S4 method for signature 'numeric,Model,Samples'
dose(prob, model, samples, ...)

## S4 method for signature 'numeric,LogisticNormal,Samples'
dose(prob, model, samples)

## S4 method for signature 'numeric,LogisticLogNormal,Samples'
dose(prob, model, samples)

## S4 method for signature 'numeric,LogisticLogNormalSub,Samples'
dose(prob, model, samples)

## S4 method for signature 'numeric,ProbitLogNormal,Samples'
dose(prob, model, samples)

## S4 method for signature 'numeric,ProbitLogNormalRel,Samples'
dose(prob, model, samples)

## S4 method for signature 'numeric,LogisticLogNormalMixture,Samples'
dose(prob, model, samples)

## S4 method for signature 'numeric,LogisticIndepBeta,Samples'
dose(prob, model, samples)

## S4 method for signature 'numeric,LogisticIndepBeta,missing'
dose(prob, model)

Arguments

prob

(number or numeric)
the toxicity probability which is targeted. This must be a scalar if non-scalar samples are used. It can be a vector of any finite length, if samples are scalars or samples are not used, as e.g. in case of pseudo DLE (dose-limiting events)/toxicity model.

model

(GeneralModel or ModelTox)
the model for single agent dose escalation or pseudo DLE/toxicity model.

samples

(Samples)
the samples of model's parameters that will be used to compute the resulting doses.

...

model specific parameters when samples are not used.

Details

The dose function computes the doses for given toxicity probabilities, using samples of the model parameter(s). If you work with multivariate model parameters, then assume that your model specific dose method receives a samples matrix where the rows correspond to the sampling index, i.e. the layout is then nSamples x dimParameter.

Value

A number or numeric vector with the doses. 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 prob.

Note

The dose and prob functions are the inverse of each other.

See Also

doseFunction, prob.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Create some data.
my_data <- Data(
  x = c(0.1, 0.5, 1.5, 3, 6, 10, 10, 10),
  y = c(0, 0, 0, 0, 0, 0, 1, 0),
  cohort = c(0, 1, 2, 3, 4, 5, 5, 5),
  doseGrid = c(0.1, 0.5, 1.5, 3, 6, seq(from = 10, to = 80, by = 2))
)

# Initialize a model, e.g. 'LogisticLogNormal'.
my_model <- LogisticLogNormal(
  mean = c(-0.85, 1),
  cov = matrix(c(1, -0.5, -0.5, 1), nrow = 2),
  ref_dose = 56
)

# Get samples from posterior.
my_options <- McmcOptions(burnin = 100, step = 2, samples = 20)
my_samples <- mcmc(data = my_data, model = my_model, options = my_options)

# Posterior for the dose achieving Prob(DLT) = 0.45.
dose(prob = 0.45, model = my_model, samples = my_samples)

# Create data from the 'Data' (or 'DataDual') class.
dlt_data <- Data(
  x = c(25, 50, 25, 50, 75, 300, 250, 150),
  y = c(0, 0, 0, 0, 0, 1, 1, 0),
  doseGrid = seq(from = 25, to = 300, by = 25)
)

# Initialize a toxicity model using 'LogisticIndepBeta' model.
dlt_model <- LogisticIndepBeta(
  binDLE = c(1.05, 1.8),
  DLEweights = c(3, 3),
  DLEdose = c(25, 300),
  data = dlt_data
)

# Get samples from posterior.
dlt_sample <- mcmc(data = dlt_data, model = dlt_model, options = my_options)

# Posterior for the dose achieving Prob(DLT) = 0.45.
dose(prob = 0.45, model = dlt_model, samples = dlt_sample)
dose(prob = c(0.45, 0.6), model = dlt_model)

0liver0815/onc-crmpack-test documentation built on Feb. 19, 2022, 12:25 a.m.