Rev Language Reference


mvRandomGeometricWalk - Geometric random walk

A move that performs geometric random walk on an integer variable. The displacement of the random walk is drawn from a geometric distribution, mirrored for positive and negative steps.

Usage

mvRandomGeometricWalk(Integer x, Probability alpha, Bool tune, RealPos weight, Probability tuneTarget)

Arguments

x : Integer (<stochastic> pass by reference)
The variable on which this move operates.
alpha : Probability (pass by value)
The success probability of the geometric distribution.
Default : 0.5
tune : Bool (pass by value)
Should we tune the success probability during burnin?
Default : TRUE
weight : RealPos (pass by value)
The weight determines the relative frequency with which this move will be attempted. For details, see the description of the 'moveschedule' parameter on the documentation page for 'mcmc()'.
Default : 1
tuneTarget : Probability (pass by value)
The acceptance probability targeted by auto-tuning.
Default : 0.44

Example


p <- 0.8
x ~ dnGeom(p)

moves[1] = mvRandomGeometricWalk(x, weight=1.0)
monitors[1] = mvScreen(printgen=1000, x)

mymodel = model(p)
mymcmc = mcmc(mymodel, monitors, moves)
mymcmc.burnin(generations=20000,tuningInterval=100)
mymcmc.run(generations=200000)

See Also