getprior: Samples from the specified prior distribution.

Description Usage Arguments Details Author(s) References See Also Examples

View source: R/bcrm_0.4.6.R

Description

A sample of specified size is obtained from the prior distribution.

Usage

1
getprior(prior.alpha, n)

Arguments

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

  1. Gamma(a,b), where a=shape, b=scale: mean=a*b, variance=a*b*b

  2. Uniform(a,b), where a=min, b=max

  3. Lognormal(a,b), where a=mean on the log scale, b=variance on the log scale

  4. 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.

n

The number of samples.

Details

A vector of size n is returned from the specified prior distribution.

Author(s)

Michael Sweeting mjs212@medschl.cam.ac.uk (University of Cambridge, UK), drawing on code originally developed by J. Jack Lee and Nan Chen, Department of Biostatistics, the University of Texas M. D. Anderson Cancer Center

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

See Also

bcrm, find.x

Examples

1
2
3
prior.alpha<-list(1,1,1)
samples.alpha<-getprior(prior.alpha,2000)
hist(samples.alpha)

bcrm documentation built on May 19, 2017, 6:24 p.m.

Search within the bcrm package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.