View source: R/distributions.R
get_discrete_dist | R Documentation |
Get a discretized, truncated version of a distribution
get_discrete_dist(params)
params |
distribution params (output of |
Numeric. Vector with discretized density.
# Define distributions
fec = ern::def_dist(
dist = "gamma",
mean = 12.90215,
mean_sd = 1.136829,
shape = 1.759937,
shape_sd = 0.2665988,
max = 33
)
gi = ern::def_dist(
dist = "gamma",
mean = 6.84,
mean_sd = 0.7486,
shape = 2.39,
shape_sd = 0.3573,
max = 15
)
# Get their (discretized) densities
d.fec = get_discrete_dist(fec)
d.gi = get_discrete_dist(gi)
print(d.fec)
print(d.gi)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.