mcmc
- MCMC analysis object
model : | Model (pass by value) |
The model graph. | |
monitors : | Monitor[] (pass by value) |
The monitors used for this analysis. | |
moves : | Move[] (pass by value) |
The moves used for this analysis. | |
moveschedule : | String (pass by value) |
The strategy how the moves are used. | |
Default : random | |
Options : sequential|random|single | |
nruns : | Natural (pass by value) |
The number of replicate analyses. | |
Default : 1 | |
combine : | String (pass by value) |
How should we combine the traces once the simulation is finished. | |
Default : none | |
Options : sequential|mixed|none | |
ntries : | Natural (pass by value) |
The number of initialization attempts. | |
Default : 1000 | |
priorHeat : | RealPos (pass by value) |
The power that the prior will be raised to. | |
Default : 1 | |
likelihoodHeat : | RealPos (pass by value) |
The power that the likelihood will be raised to. | |
Default : 1 | |
posteriorHeat : | RealPos (pass by value) |
The power that the posterior will be raised to. | |
Default : 1 |
# Create a simple model (unclamped)
a ~ exponential(1)
mymodel = model(a)
# Create a move vector and a monitor vector
moves[1] = mvScale(a, lambda=1.0, weight=1.0)
monitors[1] = mnFile(a,"output/out.log")
# Create an mcmc object
mymcmcObject = mcmc( mymodel, monitors, moves)
# Run a short analysis
mymcmcObject.burnin( generations = 400, tuningInterval = 100)
mymcmcObject.run( generations = 400)
# print the summary of the operators (now tuned)
mymcmcObject.operatorSummary()