powered by
Note the name of the function to define a prior (gamma_p), in order to avoid confusion with the R mathematical function gamma.
gamma_p
gamma
gamma_p(alpha, beta)
A list defining the prior.
Shape parameter (equivalent to the shape parameter of R's rgamma).
shape
rgamma
Rate parameter (equivalent to the rate parameter of R's rgamma).
rate
gamma_p(9, 2) hist(sample_from_prior(gamma_p(9, 2), 1e3))
Run the code above in your browser using DataLab