Skip to content
Prev 108198 / 398500 Next

Bayesian inference: Poisson distribution with normal (!) prior

Le Vendredi 26 Janvier 2007 08:56, Carsten Steinhoff a ?crit?:
Ok, I'll not question the idea to use a distribution defined on real numbers 
as a prior for a strictly positive parameter... Now, if what you want are 
random numbers from the Poisson/normal mixture, this will do:
The reason this works is because the r* functions are vectorized, so here 
rpois() will generate the first number with lambda equal to the first value 
returned by rnorm(), the second number with lambda equal to the second value 
returned by rnorm(), etc.

Am I missing what you want to do?