Bayesian Inference Help

Hi all, I've a Bayesian inference project to complete. I've figured most of it out except for the following simulation question: (already found posterior mean value)

Simulate 10 new survey data values using the posterior mean parameter value as probability of success theta

The initial data set was made up of 40 responses either 1=yes or 0=no, how do I simulate 10 new data values for this? I tried rnbinom but it's giving me answers not in binary form.

Without a reprex. See the FAQ, I have to guess. If you simply need 10 more responses

addn <- sample(1,0,10,replace = TRUE)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.