View source: R/dist_exponential.R
| dist_exponential | R Documentation |
See stats::Exponential.
dist_exponential(rate = NULL)
rate |
Scalar rate parameter, or |
The parameter can be overridden with with_params = list(rate = ...).
An ExponentialDistribution object.
Other Distributions:
Distribution,
dist_bdegp(),
dist_beta(),
dist_binomial(),
dist_blended(),
dist_dirac(),
dist_discrete(),
dist_empirical(),
dist_erlangmix(),
dist_gamma(),
dist_genpareto(),
dist_lognormal(),
dist_mixture(),
dist_negbinomial(),
dist_normal(),
dist_pareto(),
dist_poisson(),
dist_translate(),
dist_trunc(),
dist_uniform(),
dist_weibull()
rate <- 1
d_exp <- dist_exponential()
x <- d_exp$sample(20, with_params = list(rate = rate))
d_emp <- dist_empirical(x, positive = TRUE)
plot_distributions(
empirical = d_emp,
theoretical = d_exp,
estimated = d_exp,
with_params = list(
theoretical = list(rate = rate),
estimated = list(rate = 1 / mean(x))
),
.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.