to_mu_sd_gamma: Parameter Conversion for Gamma Distribution

Description Usage Arguments Details Value See Also Examples

View source: R/gammapar.R

Description

The function to_mu_sd_gamma converts the shape and rate to the mean and standard deviation

Usage

1
to_mu_sd_gamma(alpha, lambda)

Arguments

alpha

a numeric vector representing the shape of one or more than one gamma distributions

lambda

a numeric vector representing the rate of one or more than one gamma distributions. alpha and lambda should have the same length.

Details

The purpose of this function is to convert the parameterization of gamma distribution in the form of shape and rate to the form of mean and standard deviation.

Value

a list of two items

mu

a vector of the means of gamma distributions

sd

a vector of the standard deviations of gamma distributions

See Also

to_shape_rate_gamma

Examples

1
2
to_mu_sd_gamma(2, 1)
to_mu_sd_gamma(c(2, 4), c(1, 1))

mixR documentation built on June 1, 2021, 5:07 p.m.