Nested Dirichlet Process NDP applied to censored data
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
weights <- matrix(c(1,0,0,0,1,0,0,0,1), ncol=3)
data <- sim.data(n=100, J=10, weights)
G2 <- init.NDP(prior=list(mu=0, n=0.1, v=3, vs2=1*3),K=5, L=35, thinning=50,
burnin = 0, max_iter = 5000 )
G2 <- MCMC.NDP(G2, data, 500)
validate.NDP(G2, data)
plot.ICDF(G2@theta[,which.max(G2@pi)], G2@phi[,which.max(G2@pi)], G2@weights[,which.max(G2@pi)],
G2@L, grid=0:500, distribution=data@presentation, xlim=500)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.