model
- Create a model object
x : | RevObject (pass by const reference) |
Any variable that is connected in the model graph. | |
... : | RevObject (pass by const reference) |
Additional variables. |
# Create a simple model (unclamped)
a ~ dnExponential(1)
b ~ dnExponential(a)
mymodel = model(b) # equivalent to model(a) or model(a, b)
# Save a DOT visualization of the model to file
mymodel.graph("mymodel.dot")
# Create a move vector and a monitor vector
moves = [ mvScale( a, lambda = 1.0, weight = 1.0 ) ]
monitors = [ mnScreen(printgen = 10, a) ]
# Create an mcmc object
mymcmcObject = mcmc( mymodel, monitors, moves )
# Print value of a
print(a)
# Run a short analysis
mymcmcObject.run( generations = 100 )
print(a) # Value is unchanged in the workspace - only the copy is modified