11.08.2013 Views

Simulation - Hadley Wickham

Simulation - Hadley Wickham

Simulation - Hadley Wickham

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Generating random<br />

numbers<br />

• runif (uniform), rpois (poisson), rnorm<br />

(normal), rbinom (binomial), rgamma<br />

(gamma), rbeta (beta)<br />

•<br />

•<br />

First argument for all is n, number of samples<br />

to generate<br />

Then parameters of the distribution<br />

(always check that the distribution is<br />

parameterised the way you expect)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!