View source: R/dist_erlangmix.R
| dist_erlangmix | R Documentation |
Erlang Mixture distribution
dist_erlangmix(shapes, scale = NULL, probs = NULL)
shapes |
Shape parameters, a trunc_erlangmix fit, or |
scale |
Common scale parameter, or |
probs |
Mixing probabilities, or |
An ErlangMixtureDistribution object.
Other Distributions:
Distribution,
dist_bdegp(),
dist_beta(),
dist_binomial(),
dist_blended(),
dist_dirac(),
dist_discrete(),
dist_empirical(),
dist_exponential(),
dist_gamma(),
dist_genpareto(),
dist_lognormal(),
dist_mixture(),
dist_negbinomial(),
dist_normal(),
dist_pareto(),
dist_poisson(),
dist_translate(),
dist_trunc(),
dist_uniform(),
dist_weibull()
params <- list(scale = 1.0, probs = list(0.5, 0.3, 0.2), shapes = list(1L, 2L, 3L))
dist <- dist_erlangmix(vector("list", 3L))
x <- dist$sample(20, with_params = params)
d_emp <- dist_empirical(x, positive = TRUE)
plot_distributions(
empirical = d_emp,
theoretical = dist,
with_params = list(
theoretical = params
),
.x = seq(1e-4, 5, length.out = 100)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.