R Under development (unstable) (2024-10-16 r87241 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 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.12 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.5547814 NA b 0.1069314 NA Loglikelihood: -553.0793 AIC: 1110.159 BIC: 1119.974 Correlation matrix: [1] NA > cdfcomp(f1, do.points=FALSE) > qqcomp(f1) > > > # 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 Std. Error a -0.9999816 NA b 1.0000402 NA Loglikelihood: -671.1798 AIC: 1346.36 BIC: 1356.175 Correlation matrix: [1] 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.497053 NA b 5.370151 NA Loglikelihood: -549.6746 AIC: 1103.349 BIC: 1113.165 Correlation matrix: [1] NA > > b1 <- bootDR(f1, niter=nboot, silent=TRUE) > plot(b1, enhance=TRUE, trueval=c(-1/2, 5)) > > > proc.time() user system elapsed 5.28 0.37 5.57