# NOT RUN {
obj <- CatDirichlet(gamma=list(alpha=runif(26,1,2),uniqueLabels = letters))
x <- sample(letters,size = 20,replace = TRUE)
## res1 and res2 should provide the same result
res1 <- dPosteriorPredictive(obj = obj,x=x,LOG = TRUE)
res2 <- numeric(length(x))
for(i in seq_along(x)) res2[i] <- marginalLikelihood(obj=obj,x=x[i],LOG = TRUE)
# }
Run the code above in your browser using DataLab