R Under development (unstable) (2024-12-17 r87446 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.13 Date: BugReport: https://github.com/spedygiorgio/mbbefd/issues > library(fitdistrplus) > > n <- 1e3 > nboot <- 1000 > nboot <- 10 > set.seed(123456) > x <- rMBBEFD(n, 8, 1/4) > > system.time(f1 <- fitDR(x, "MBBEFD")) user system elapsed 0.32 0.02 0.33 > summary(f1) Fitting of the distribution ' MBBEFD ' by maximum likelihood Parameters : estimate Std. Error g 10.61863825 0.511546319 b 0.09417403 0.004009201 Loglikelihood: -123.4709 AIC: 250.9419 BIC: 260.7574 Correlation matrix: g b g 1.00000000 -0.08392064 b -0.08392064 1.00000000 > > #should be similar > f0 <- fitdist(x, "MBBEFD", start= list(g=4, b=1/2)) > summary(f0) Fitting of the distribution ' MBBEFD ' by maximum likelihood Parameters : estimate Std. Error g 8.2506946 0.68594487 b 0.2397682 0.04292387 Loglikelihood: -106.5805 AIC: 217.1609 BIC: 226.9764 Correlation matrix: g b g 1.000000 -0.813707 b -0.813707 1.000000 > > fitDR(x, "MBBEFD") Fitting of the distribution ' MBBEFD ' by maximum likelihood Parameters: estimate Std. Error g 10.61863825 0.511546319 b 0.09417403 0.004009201 > mledist(x, "MBBEFD", start= list(g=4, b=1/2))$hessian g b g 6.290106 81.79305 b 81.793050 1606.34443 > > > cdfcomp(f1, do.points=FALSE) > qqcomp(f1) > > > > # llsurface(plot.min=c(1, 0), plot.max=c(11, 1/2), plot.arg=c("g", "b"), obs=x, distr="MBBEFD", nlevels=25) > # points(f1$estimate["g"], f1$estimate["b"], pch="+", col="red") > # points(8, 1/4, pch="x", col="black") > > > b1 <- bootDR(f1, niter=nboot, silent=TRUE) > plot(b1, enhance=TRUE, trueval=c(8, 1/4)) > > > set.seed(123456) > x <- rMBBEFD(n, 2, 1/4) > > system.time(f1 <- fitDR(x, "MBBEFD")) user system elapsed 0.22 0.00 0.22 > > > b1 <- bootDR(f1, niter=nboot, silent=TRUE) > plot(b1, enhance=TRUE, trueval=c(2, 1/4)) > > > proc.time() user system elapsed 7.65 0.50 8.09