#initialize and propagate a object
FVDDP = initialize(1, function(x) rpois(x, 3),
function(x) dpois(x, 3), TRUE)
update(fvddp = FVDDP, y.new = c(4,5))
#in this case, update after a propagation to see the diiffent effect of polya urn on the weights
FVDDP=initialize(3, function(x) rnorm(x, -1,3),
function(x) dnorm(x, -1, 3), FALSE)
FVDDP = update(FVDDP, c(-1.145, 0.553, 0.553))
FVDDP = propagate(FVDDP, 0.6)
update(fvddp = FVDDP, y.new = c(0.553, -0.316, -1.145))
Run the code above in your browser using DataLab