draw.post {bspmma} | R Documentation |
Overlapping Plots of Posterior Distributions for Several Models
Description
Draw overlapping kernel density estimates of the posterior
distributions of the parameters of the conditional or ordinary
Dirichlet model, where the posteriors arise from different values
of the Dirichlet precision parameter M
.
Usage
draw.post(mcout,burnin=1000,ind.par=NULL,adjust=1,...)
Arguments
mcout |
is a list. Each item in the list is a matrix of MCMC
output, corresponding to different values of |
burnin |
is the number of initial chains to omit from the
estimates, must be no larger than |
ind.par |
an integer vector, containing indices of which columns
of |
adjust |
is the bin width argument for the call to the R base package function density. |
... |
additional arguments to plot may be supplied. |
Examples
## Not run:
## Conditional Dirichlet model
## Set up the breast cancer dataset.
data(breast.17)
breast.data <- as.matrix(breast.17) # Data must be a matrix object.
## Generate at least two chains, from models which are the same except
## for different \eqn{M}{M} values.
set.seed(1) # initialize the seed at 1 for test purposes
breast.c1 <- dirichlet.c(breast.data, ncycles=4000, M=5)
breast.c2 <- dirichlet.c(breast.data,ncycles=4000, M=1000)
## Create list object.
breast.c1c2 <- list("5"=breast.c1$chain, "1000"= breast.c2$chain)
## Decide on some number of initial runs to omit from the analysis.
draw.post(breast.c1c2, burnin=100) # plots for hyperparameters only
## End(Not run)