Skip to content
Prev 304257 / 398503 Next

How to generate a matrix of Beta or Binomial distribution

Hello,

I'm glad it helped.
Inline.
Em 27-08-2012 19:00, Zuofeng Shang escreveu:
No, you are not wrong, and no, it is not strange. You are restarting the 
random number generator so your _first_ random beta number cannot be 
eqaul to the _second_ one. Just look:

set.seed(1)
rbeta(1,3,4) # 0.3016368

set.seed(1)
rbeta(2,3,4) # 0.3016368 0.4679171

The second is, as expected, what you had. When yo change the beta 
parameters, the numbers must also change (obvious!)

Rui Barradas