# posterior: Calculate posterior distribution of CRM model parameter(s) In bcrm: Bayesian Continual Reassessment Method for Phase I Dose-Escalation Trials

## Description

Given the prior, functional form of the dose-toxicity model, and data, this function returns the posterior distribution (via either MCMC samples, or posterior summaries) of the CRM model parameter(s)

## Usage

 ```1 2 3 4 5``` ```Posterior.exact(tox,notox,sdose,ff,prior.alpha) Posterior.rjags(tox,notox,sdose,ff,prior.alpha,burnin.itr,production.itr) Posterior.BRugs(tox,notox,sdose,ff,prior.alpha,burnin.itr,production.itr) Posterior.R2WinBUGS(tox,notox,sdose,ff,prior.alpha,burnin.itr,production.itr ,bugs.directory) ```

## Arguments

 `tox` A vector of length `k` listing the number of patients who have experienced the outcome (toxicity) at each dose level `1,...,k`. If missing, then it is assumed that no data have thus far been collected. `notox` A vector of length `k` listing the number of patients who have not experienced the outcome (toxicity) at each dose level `1,...,k`. If missing, then it is assumed that no data have thus far been collected. `sdose` A vector of length `k` listing the standardised doses used in the CRM model. `ff` A string indicating the functional form of the dose-response curve. Options are ht 1-parameter hyperbolic tangent logit1 1-parameter logistic power 1-parameter power logit2 2-parameter logistic `prior.alpha` A list of length 3 containing the distributional information for the prior. The first element is a number from 1-4 specifying the type of distribution. Options are Gamma(a,b), where a=shape, b=scale: mean=a*b, variance=a*b*b Uniform(a,b), where a=min, b=max Lognormal(a,b), where a=mean on the log scale, b=standard deviation on the log scale Bivariate Lognormal(a,b), where a=mean vector on the log scale, b=Variance-covariance matrix on the log scale. This prior should be used only in conjunction with a two-parameter logistic model. The second and third elements of the list are the parameters a and b, respectively. `burnin.itr` Number of burn-in iterations (default 2000). `production.itr` Number of production iterations (default 2000). `bugs.directory` Directory that contains the WinBUGS executable if `method="R2WinBUGS"`. Defaults to "C:/Program Files/WinBUGS14/".

## Details

`Posterior.exact` produces posterior summary statistics of the CRM model parameter(s), and probabilities of toxicity at the dose levels using exact Bayesian computation (integration) of the posterior distribution. If `Posterior.BRugs` or `Posterior.R2WinBUGS` is specified, then posterior samples of the CRM model parameter(s) is returned by the function.

## Author(s)

Michael Sweeting [email protected] (University of Cambridge, UK)

## References

Sweeting M., Mander A., Sabin T. bcrm: Bayesian Continual Reassessment Method Designs for Phase I Dose-Finding Trials. Journal of Statistical Software (2013) 54: 1–26. http://www.jstatsoft.org/article/view/v054i13

`bcrm`
 ``` 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``` ```## Dose-escalation cancer trial example as described in Neuenschwander et al 2008. ## Pre-defined doses dose<-c(1,2.5,5,10,15,20,25,30,40,50,75,100,150,200,250) ## Pre-specified probabilities of toxicity ## [dose levels 11-15 not specified in the paper, and are for illustration only] p.tox0<-c(0.010,0.015,0.020,0.025,0.030,0.040,0.050,0.100,0.170,0.300,0.400,0.500,0.650 ,0.800,0.900) ## Data from the first 5 cohorts of 18 patients tox<-c(0,0,0,0,0,0,2,0,0,0,0,0,0,0,0) notox<-c(3,4,5,4,0,0,0,0,0,0,0,0,0,0,0) ## Target toxicity level target.tox<-0.30 ## Lognormal prior prior.alpha<-list(3,0,1.34^2) ## Power functional form ff<-"power" ## Standardised doses sdose<-find.x(ff,p.tox0,alpha=1) ## Posterior distribution of the model parameter using exact computation post.exact<-Posterior.exact(tox,notox,sdose,ff,prior.alpha) print(post.exact) ## Posterior distribution of the model parameter using rjags post.rjags<-Posterior.rjags(tox,notox,sdose,ff,prior.alpha ,burnin.itr=2000,production.itr=2000) print(mean(post.rjags)) hist(post.rjags) ## Posterior distribution of the model parameter using BRugs (Windows and i386 Linux only) if(Sys.info()["sysname"] %in% c("Windows","Linux")){ post.BRugs<-Posterior.BRugs(tox,notox,sdose,ff,prior.alpha ,burnin.itr=2000,production.itr=2000) print(mean(post.BRugs)) hist(post.BRugs) } ```