R Under development (unstable) (2023-08-27 r85021 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 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.11 Date: BugReport: https://github.com/spedygiorgio/mbbefd/issues > library(fitdistrplus) > > > #oigbeta > n <- 1e3 > nboot <- 1000 > nboot <- 10 > set.seed(12345) > x <- roigbeta(n, 3, 2, 5/2, 1/6) > > > f1 <- fitDR(x, "oigbeta", method="mle", control=list(trace=1, REPORT=1, maxit=500)) # initial value -537.419814 iter 1 value -537.419814 final value -537.419814 converged > summary(f1) Fitting of the distribution ' oigbeta ' by maximum likelihood Parameters : estimate Std. Error shape0 5.9734195 2.4226382 shape1 0.9184444 0.4482542 shape2 2.8715345 0.2986598 p1 0.1690000 0.3747519 Loglikelihood: 83.12278 AIC: -158.2456 BIC: -138.6145 Correlation matrix: shape0 shape1 shape2 shape0 1.0000000 -0.9960811 0.8709258 0 shape1 -0.9960811 1.0000000 -0.8364654 0 shape2 0.8709258 -0.8364654 1.0000000 0 0.0000000 0.0000000 0.0000000 1 > > b1 <- bootDR(f1, niter=nboot, silent=TRUE) > summary(b1) Parametric bootstrap medians and 95% percentile CI Median 2.5% 97.5% shape0 7.0126208 1.9269731 8.502722 shape1 0.8010836 0.6022374 4.127021 shape2 3.1228572 2.5200487 3.297440 p1 0.1650000 0.1544500 0.168775 > > plot(b1, enhance=TRUE, trueval=c(3, 2, 5/2, 1/6)) > > f2 <- fitDR(x, "oigbeta", method="tlmme") > summary(f2) Parameters : estimate shape0 0.9904635 shape1 7.0770854 shape2 2.4575438 p1 0.1690003 Loglikelihood: 81.77526 AIC: -155.5505 BIC: -135.9195 > > gofstat(list(f1, f2)) Goodness-of-fit statistics 1-mle-oigbeta 2-tlmme-oigbeta Kolmogorov-Smirnov statistic 0.169000 0.169000 Cramer-von Mises statistic 1.646804 1.690731 Anderson-Darling statistic Inf Inf Goodness-of-fit criteria 1-mle-oigbeta 2-tlmme-oigbeta Akaike's Information Criterion -158.2456 -155.5505 Bayesian Information Criterion -138.6145 -135.9195 > cdfcomp(list(f1, f2), do.points=FALSE, ylogscale = TRUE) > ppcomp(list(f1, f2)) > > > proc.time() user system elapsed 3.68 0.17 3.84