R Under development (unstable) (2026-01-19 r89308 ucrt) -- "Unsuffered Consequences" Copyright (C) 2026 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(mbbefd) Loading required package: fitdistrplus Loading required package: MASS Loading required package: survival Loading required package: alabama Loading required package: numDeriv Loading required package: Rcpp Package: mbbefd Version: 0.8.14 Date: BugReport: https://github.com/spedygiorgio/mbbefd/issues > library(fitdistrplus) > > n <- 1e3 > nboot <- 1000 > nboot <- 10 > set.seed(123456) > lossrate <- rmbbefd(n, 1/2, 1/10) > > > f1 <- fitDR(lossrate, "mbbefd") > summary(f1) Fitting of the distribution ' mbbefd ' by maximum likelihood Parameters : estimate Std. Error a 0.5553806 0.11997101 b 0.1070020 0.01648866 Loglikelihood: -553.0793 AIC: 1110.159 BIC: 1119.974 Correlation matrix: a b a 1.0000000 0.9174775 b 0.9174775 1.0000000 > > #should be similar > f0 <- fitdist(lossrate, "mbbefd", start= list(a=1/4, b=1/4)) Warning message: In fitdist(lossrate, "mbbefd", start = list(a = 1/4, b = 1/4)) : The dmbbefd function should return a vector of with NaN values when input has inconsistent values and not raise an error > summary(f0) Fitting of the distribution ' mbbefd ' by maximum likelihood Parameters : estimate Std. Error a 0.5545699 0.11957317 b 0.1068949 0.01645331 Loglikelihood: -553.0793 AIC: 1110.159 BIC: 1119.974 Correlation matrix: a b a 1.0000000 0.9172606 b 0.9172606 1.0000000 > > > cdfcomp(f1, do.points=FALSE) > qqcomp(f1) > vcov(f1) a b a 0.014393043 0.001814919 b 0.001814919 0.000271876 > > > # llsurface(plot.min=c(0, 0), plot.max=c(2, 1/2), plot.arg=c("a", "b"), obs=lossrate, distr="mbbefd", nlevels=25) > # points(f1$estimate["a"], f1$estimate["b"], pch="+", col="red") > # points(1/2, 1/10, pch="x", col="black") > > b1 <- bootDR(f1, niter=nboot, silent=TRUE) > plot(b1, enhance=TRUE, trueval=c(1/2, 1/10)) > > > f2 <- fitDR(lossrate, "mbbefd", method="tlmme") > summary(f2) Parameters : estimate 1 NA Loglikelihood: NA AIC: NA BIC: NA > > > > set.seed(123456) > lossrate <- rmbbefd(n, -1/2, 5) > > > f1 <- fitDR(lossrate, "mbbefd") > summary(f1) Fitting of the distribution ' mbbefd ' by maximum likelihood Parameters : estimate Std. Error a -0.4973342 0.02217064 b 5.3524451 1.05189781 Loglikelihood: -549.6747 AIC: 1103.349 BIC: 1113.165 Correlation matrix: a b a 1.0000000 0.7336745 b 0.7336745 1.0000000 > > b1 <- bootDR(f1, niter=nboot, silent=TRUE) > plot(b1, enhance=TRUE, trueval=c(-1/2, 5)) > > > proc.time() user system elapsed 20.15 5.07 25.21