# dose: Compute the doses for a given probability, given model and... In crmPack: Object-Oriented Implementation of CRM Designs

## Description

Compute the doses for a given probability, given model and samples

## Usage

 ``` 1 2 3 4 5 6 7 8 9 10``` ```dose(prob, model, samples, ...) ## S4 method for signature 'numeric,Model,Samples' dose(prob, model, samples, ...) ## S4 method for signature 'numeric,ModelTox,Samples' dose(prob, model, samples, ...) ## S4 method for signature 'numeric,ModelTox,missing' dose(prob, model, samples, ...) ```

## Arguments

 `prob` the probability `model` the `Model` `samples` the `Samples` `...` unused

## Methods (by class)

• `prob = numeric,model = ModelTox,samples = Samples`: Compute the doses for a given probability, given Pseudo DLE model with samples

• `prob = numeric,model = ModelTox,samples = missing`: Compute the dose for a given probability and a given Pseudo DLE model without samples

## 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 44 45 46 47 48 49 50 51 52 53``` ```# create some data 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 model <- LogisticLogNormal(mean=c(-0.85, 1), cov=matrix(c(1, -0.5, -0.5, 1), nrow=2), refDose=56) # Get samples from posterior options <- McmcOptions(burnin=100, step=2, samples=2000) set.seed(94) samples <- mcmc(data, model, options) # Posterior for the dose achieving Prob(DLE) = 0.45 TD45 <- dose(prob=0.45,model=model,samples=samples) # create data from the 'Data" (or DataDual') class data <- Data(x = c(25,50,25,50,75,300,250,150), y = c(0,0,0,0,0,1,1,0), doseGrid = seq(25,300,25)) ## Initialize a model from 'ModelTox' class e.g using 'LogisticIndepBeta' model DLEmodel <- LogisticIndepBeta(binDLE=c(1.05,1.8), DLEweights=c(3,3), DLEdose=c(25,300), data=data) options <- McmcOptions(burnin=100, step=2, samples=200) DLEsamples <- mcmc(data=data,model=DLEmodel,options=options) TD45 <- dose(prob=0.45, model = DLEmodel,samples = DLEsamples) # create data from the 'Data' (or 'DataDual') class data <- Data(x = c(25,50,25,50,75,300,250,150), y = c(0,0,0,0,0,1,1,0), doseGrid = seq(25,300,25)) ## Initialize a model from 'ModelTox' class e.g using 'LogisticIndepBeta' model DLEmodel <- LogisticIndepBeta(binDLE=c(1.05,1.8), DLEweights=c(3,3), DLEdose=c(25,300), data=data) TD45 <- dose(prob=0.45, model = DLEmodel) ```

crmPack documentation built on Feb. 16, 2018, 1:02 a.m.