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) > > > #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 Std. Error shape1 2.775297 0.13277006 shape2 1.821438 0.08325969 p1 0.163000 0.36936567 Loglikelihood: -268.8183 AIC: 543.6365 BIC: 558.3598 Correlation matrix: shape1 shape2 shape1 1.0000000 0.8019798 0 shape2 0.8019798 1.0000000 0 0.0000000 0.0000000 1 > > 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") Warning messages: 1: In cov2cor(varcovar) : diag(V) had non-positive or NA entries; the non-finite result may be dubious 2: In sqrt(diag(varcovar)) : NaNs produced > summary(f2) Parameters : estimate Std. Error shape0 0.9166412 NA shape1 3.0162083 NA shape2 1.7998662 NA p1 0.1630052 NA Loglikelihood: -268.8418 AIC: 545.6836 BIC: 565.3147 Correlation matrix: [1] NA > > 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.25 0.18 2.43