mvRandomCategoryWalk - Random walk on vector of naturals (e.g., from multinomial distribution) keeping
the sum of the vector constant.
| x : | Natural[] (<stochastic> pass by reference) |
| The variable on which this move operates. | |
| 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 |
# create a vector of moves
moves = VectorMoves()
# draw from a multinomial distribution
num_e_prior <- simplex(rep(1, 6))
number_events_pi ~ dnMultinomial(p=num_e_prior, size=20)
# place a move on the draw
moves.append( mvRandomCategoryWalk(x=number_events_pi, weight=5) )