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) > > > #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.4226384 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.0125960 1.9269729 8.502722 shape1 0.8010892 0.6022374 4.127021 shape2 3.1228572 2.5200487 3.297429 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") 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.9904635 NA shape1 7.0770854 NA shape2 2.4575438 NA p1 0.1690003 NA Loglikelihood: 81.77526 AIC: -155.5505 BIC: -135.9195 Correlation matrix: [1] NA > > 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 5.28 0.34 5.59