Skip to contents

This function accepts different parameterizations to specify a discretized Gamma distribution.

Usage

get_discrete_gamma(
  gamma_shape,
  gamma_rate,
  gamma_scale,
  gamma_mean,
  gamma_sd,
  maxX,
  include_zero = TRUE,
  print_params = FALSE
)

Arguments

gamma_shape

Shape parameter of the Gamma distribution.

gamma_rate

Rate parameter of the Gamma distribution.

gamma_scale

Scale parameter of the Gamma distribution. Can be specified instead of the rate. Only has an effect if the rate is not specified.

gamma_mean

Alternative parameterization: Mean of the Gamma distribution.

gamma_sd

Alternative parameterization: Standard deviation of the Gamma distribution.

maxX

Right truncation point. All probability mass beyond maxX will be assigned to maxX.

include_zero

Should the distribution explicitly cover X=0, or should X=1 include the probability mass for X=0 too?

print_params

Should the shape and rate parameters be printed?

Value

A numeric vector representing the PMF of the discretized Gamma distribution.