nStarts-method: Number of MCMC chains.

Description Usage Arguments Details Value Examples

Description

This function retrieves the number of chains used for an MCMC simulation.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
nStarts(object)

nStarts(object) <- value

## S4 method for signature 'McmcParams'
nStarts(object)

## S4 replacement method for signature 'McmcParams,ANY'
nStarts(object) <- value

## S4 method for signature 'MixtureModel'
nStarts(object)

## S4 replacement method for signature 'MixtureModel,ANY'
nStarts(object) <- value

Arguments

object

see showMethods(nStarts)

value

new number of chains

Details

Simulating starting values from the priors makes it imperative to run a large nubmer of simulations for burnin and to carefully evaluate the chains following burning for convergence. The adequacy of the burnin is difficult to assess in high-dimensional settings with a large number of CNPs. To avoid starting in regions of low posterior probabilitiy, we use existing EM-based methods in the package {mclust} to select starting values from N bootstrap sample of the observed data, where N is specificed as in the example below. For each bootstrap sample, starting values for the model are estimated. For each set of simulated starting values, the log likelihood of the full data is evaluated. The starting values with the largest log likelihood are used as initial values for the MCMC simulations.

Value

An integer of the number of different starts.

Examples

1
2
3
number_of_chains <- nStarts(SingleBatchModelExample)
number_of_chains <- 10
nStarts(SingleBatchModelExample) <- number_of_chains

CNPBayes documentation built on May 6, 2019, 4:06 a.m.