Learn R Programming

gasmodel (version 0.6.1)

distr_mean: Compute Mean

Description

A function computing mean for a given distribution.

Usage

distr_mean(f, distr, param = NULL, par_link = NULL)

Value

The mean.

Arguments

f

Parameters. For the same parameters for all observations, a numeric vector. For individual parameters for each observation, a numeric matrix with rows corresponding to observations.

distr

A distribution.

param

A parametrization of the distribution.

par_link

An optional logical vector indicating whether the logarithmic/logistic link should be applied to restricted parameters in order to obtain unrestricted values. Defaults to keeping the original link for all parameters.

See Also

distr()

Examples

Run this code
# Mean for the negative binomial distribution
distr_mean(f = c(13.50, 0.03), distr = "negbin")

Run the code above in your browser using DataLab