Skip to contents

See Pareto

Usage

dist_pareto(shape = NULL, scale = NULL)

Arguments

shape

Scalar shape parameter, or NULL as a placeholder.

scale

Scalar scale parameter, or NULL as a placeholder.

Value

A ParetoDistribution object.

Details

Both parameters can be overridden with with_params = list(shape = ..., scale = ...).

Examples

d_pareto <- dist_pareto(shape = 3, scale = 1)
x <- d_pareto$sample(100)
d_emp <- dist_empirical(x)

plot_distributions(
  empirical = d_emp,
  theoretical = d_pareto,
  estimated = d_pareto,
  with_params = list(
    estimated = inflate_params(
      fitdistrplus::fitdist(x, distr = "pareto")$estimate
    )
  ),
  .x = seq(0, 2, length.out = 100)
)
#> Warning: The dpareto function should return a vector of with NaN values when input has inconsistent values and not raise an error