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) > > > #oibeta > n <- 1e3 > nboot <- 1000 > nboot <- 10 > set.seed(12345) > x <- roibeta(n, 3, 2, 1/6) > > f1 <- fitDR(x, "oibeta", method="mle") > summary(f1) Fitting of the distribution ' oibeta ' by maximum likelihood Parameters : estimate shape1 2.775297 shape2 1.821438 p1 0.163000 Loglikelihood: -268.8183 AIC: 543.6365 BIC: 558.3598 > > b1 <- bootDR(f1, niter=nboot) > summary(b1) Parametric bootstrap medians and 95% percentile CI Median 2.5% 97.5% shape1 2.821540 2.544975 3.048734 shape2 1.843019 1.703373 2.055265 p1 0.167000 0.154450 0.177775 > > plot(b1, enhance=TRUE, trueval=c(3, 2, 1/6)) > > hist(b1$estim[,1]) > hist(b1$estim[,2]) > hist(b1$estim[,3]) > > > f2 <- fitDR(x, "oigbeta", method="tlmme") > summary(f2) Parameters : estimate shape0 0.9166412 shape1 3.0162083 shape2 1.7998662 p1 0.1630052 Loglikelihood: -268.8418 AIC: 545.6836 BIC: 565.3147 > > gofstat(list(f1, f2)) Goodness-of-fit statistics 1-mle-oibeta 2-tlmme-oigbeta Kolmogorov-Smirnov statistic 0.163000 0.163000 Cramer-von Mises statistic 1.463433 1.460025 Anderson-Darling statistic Inf Inf Goodness-of-fit criteria 1-mle-oibeta 2-tlmme-oigbeta Akaike's Information Criterion 543.6365 545.6836 Bayesian Information Criterion 558.3598 565.3147 > cdfcomp(list(f1, f2), do.points=FALSE) > ppcomp(list(f1, f2)) > > proc.time() user system elapsed 2.01 0.31 2.31