Generate data from posterior predictive distribution I am new to Bayesian. I want to draw data from the posterior predictive distribution p(y|D).
Do we need to find the CDF of the posterior predictive distribution and use the monte Carlo method or is there another way for simulation in bayesian?
my model has a complicated posterior predictive distribution p(y|D), so I cannot derive CDF. if I can use monte Carlo, can I draw data with pdf?

If $p(x | \theta)$ denotes the distribution of the data ($\theta$ denoting the parameter) and $\pi(\theta | x^{\textrm{obs}})$ denotes the posterior distribution of $\theta$ then you can simulate from the posterior predictive distribution by applying this two-stages procedure:

*

*simulate $\theta$ according to $\pi(\theta | x^{\textrm{obs}})$;


*then simulate an observation $x$ according to $p(x | \theta)$.
