sample_or_maximise_gamma: Draws from the gamma distribution or returns the value which...

View source: R/sampling.R

sample_or_maximise_gammaR Documentation

Draws from the gamma distribution or returns the value which maximises it

Description

Draws from the gamma distribution or returns the value which maximises it

Usage

sample_or_maximise_gamma(shape, rate, ndraws, maximise = FALSE)

Arguments

shape

the shape parameter of a gamma distribution

rate

the rate parameter of a gamma distribution

ndraws

number of draws if maximise=FALSE

maximise

whether to return the mode of the gamma distribution

Value

a value or (if ndraws > 1) a vector of values


ben18785/incidenceinflation documentation built on Feb. 8, 2024, 2:36 a.m.