Learn R Programming

gasmodel (version 0.6.1)

distr_random: Generate Random Observations

Description

A function generating random observations from a given distribution.

Usage

distr_random(t, f, distr, param = NULL, par_link = NULL)

Value

The generated observations.

Arguments

t

A number of generated observations.

f

A numeric vector of parameters. The same parameters are used for each generated observation.

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
# Random observations from the negative binomial distribution
distr_random(t = 10, f = c(13.50, 0.03), distr = "negbin")

Run the code above in your browser using DataLab