distr_random | R Documentation |
A function generating random observations from a given distribution.
distr_random(t, f, distr, param = NULL, par_link = NULL)
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. |
The generated observations.
distr()
# Random observations from the negative binomial distribution
distr_random(t = 10, f = c(0.5, 1.2), distr = "negbin")
# Random observations from the multivariate normal distribution
distr_random(t = 10, f = c(0, 0, 1, 1, 0.5), distr = "mvnorm")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.