d_genpareto <- dist_genpareto(u = 0, sigmau = 1, xi = 1)
x <- d_genpareto$sample(100)
d_emp <- dist_empirical(x)
d_genpareto$export_functions("gpd") # so fitdistrplus finds it
plot_distributions(
empirical = d_emp,
theoretical = d_genpareto,
estimated = d_genpareto,
with_params = list(
estimated = fit(dist_genpareto(), x)$params
),
.x = seq(0, 5, length.out = 100)
)
Run the code above in your browser using DataLab