d_weibull <- dist_weibull(shape = 3, scale = 1)
x <- d_weibull$sample(100)
d_emp <- dist_empirical(x)
plot_distributions(
empirical = d_emp,
theoretical = d_weibull,
estimated = d_weibull,
with_params = list(
estimated = inflate_params(
fitdistrplus::fitdist(x, distr = "weibull")$estimate
)
),
.x = seq(0, 2, length.out = 100)
)
Run the code above in your browser using DataLab