plotChains(object, chain, component, itb = 1, thin = 1, cols, ...)
MixModelBayes-class
component
is
given. Then, all parameters of the given components are plotted.
chain
is given. Then, all
trace plots are generated for all components having the parameter
specified via argument chain
.
bayesMixModel
, e.g., any burn-in
specified here is added to the burn-in that was specified when
calling bayesMixModel
.
bayesMixModel
, e.g., any
thinning specified here multiplies by the thinning that was
specified in bayesMixModel
.
plot
.
If argument main
is passed to this method, it should have as
many elements as chains are plotted. Otherwise, vector main
is
reapted.
bayesMixModel
, MixModelBayes-class
z <- c(rnorm(1000, 0, 3), rnorm(1000, 0, 5), rexp(1000, 5), -rexp(1000, 5))
mm <- bayesMixModel(z, normNull=1:2, expNeg=3, expPos=4,
sdNormNullInit=c(1, 2), rateExpNegInit=8, rateExpPosInit=8,
shapeNorm0=c(1, 1), scaleNorm0=c(1, 1),
shapeExpNeg0=c(1, 1), scaleExpNeg0=c(1, 1),
shapeExpPos0=c(1, 1), scaleExpPos0=c(1, 1),
sdAlpha=1, itb=200, nmc=1000, thin=10)
plotChains(mm, chain="pi")
plotChains(mm, component=c(2,3))
Run the code above in your browser using DataLab