Learn R Programming

isotracer (version 1.1.8)

gamma_p: Define a gamma prior

Description

Note the name of the function to define a prior (gamma_p), in order to avoid confusion with the R mathematical function gamma.

Usage

gamma_p(alpha, beta)

Value

A list defining the prior.

Arguments

alpha

Shape parameter (equivalent to the shape parameter of R's rgamma).

beta

Rate parameter (equivalent to the rate parameter of R's rgamma).

Examples

Run this code
gamma_p(9, 2)
hist(sample_from_prior(gamma_p(9, 2), 1e3))

Run the code above in your browser using DataLab