R Under development (unstable) (2026-01-19 r89308 ucrt) -- "Unsuffered Consequences" Copyright (C) 2026 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. > require(mbbefd) Loading required package: 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.14 Date: BugReport: https://github.com/spedygiorgio/mbbefd/issues > > #check of expectation for oi distribution > n <- 1e4 > > probs <- c(1/(2:9)) > > sapply(probs, function(p) + { + x <- roiunif(n, p) + c(mean(x), mbbefd:::tmean1(doiunif, p1=p), + mbbefd:::tmean2(poiunif, p1=p), mbbefd:::tmean3(ecoiunif, p1=p)) + } + ) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.7505872 0.6702613 0.6169749 0.5992394 0.5867076 0.5691780 0.5619651 [2,] 0.7500000 0.6666667 0.6250000 0.6000000 0.5833333 0.5714286 0.5625000 [3,] 0.7500000 0.6666667 0.6250000 0.6000000 0.5833333 0.5714286 0.5625000 [4,] 0.7500000 0.6666667 0.6250000 0.6000000 0.5833333 0.5714286 0.5625000 [,8] [1,] 0.5515985 [2,] 0.5555556 [3,] 0.5555556 [4,] 0.5555556 > > > > sapply(probs, function(p) + { + x <- roistpareto(n, a=2, p) + c(mean(x), mbbefd:::tmean1(doistpareto, a=2, p1=p), + mbbefd:::tmean2(poistpareto, a=2, p1=p), mbbefd:::tmean3(ecoistpareto, a=2, p1=p)) + } + ) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.6639326 0.5530255 0.5063692 0.4641545 0.4432707 0.4282251 0.4151294 [2,] 0.6666667 0.5555556 0.5000000 0.4666667 0.4444444 0.4285714 0.4166667 [3,] 0.6666667 0.5555556 0.5000000 0.4666667 0.4444444 0.4285714 0.4166667 [4,] 0.6666666 0.5555555 0.5000000 0.4666666 0.4444444 0.4285714 0.4166666 [,8] [1,] 0.4124877 [2,] 0.4074074 [3,] 0.4074074 [4,] 0.4074074 > > > > > sapply(probs, function(p) + { + x <- roibeta(n, shape1=2, shape2=3, p) + c(mean(x), mbbefd:::tmean1(doibeta, shape1=2, shape2=3, p1=p), + mbbefd:::tmean2(poibeta, shape1=2, shape2=3, p1=p), + mbbefd:::tmean3(ecoibeta, shape1=2, shape2=3, p1=p)) + } + ) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.7009576 0.59782 0.5563167 0.5236844 0.5000107 0.4832138 0.4740234 [2,] 0.7000000 0.60000 0.5500000 0.5200000 0.5000000 0.4857143 0.4750000 [3,] 0.7000000 0.60000 0.5500000 0.5200000 0.5000000 0.4857143 0.4750000 [4,] 0.7000000 0.60000 0.5500000 0.5200000 0.5000000 0.4857143 0.4750000 [,8] [1,] 0.4632800 [2,] 0.4666667 [3,] 0.4666667 [4,] 0.4666667 > > > sapply(probs, function(p) + { + x <- roigbeta(n, shape0=pi, shape1=2, shape2=3, p) + c(mean(x), mbbefd:::tmean1(doigbeta, shape0=pi, shape1=2, shape2=3, p1=p), + mbbefd:::tmean2(poigbeta, shape0=pi, shape1=2, shape2=3, p1=p), + mbbefd:::tmean3(ecoigbeta, shape0=pi, shape1=2, shape2=3, p1=p)) + } + ) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.8588133 0.8145968 0.7925852 0.7781640 0.7698319 0.7616472 0.7548354 [2,] 0.8612260 0.8149680 0.7918390 0.7779616 0.7687100 0.7621017 0.7571455 [3,] 0.8612260 0.8149680 0.7918390 0.7779616 0.7687100 0.7621017 0.7571455 [4,] 0.8612260 0.8149680 0.7918390 0.7779616 0.7687100 0.7621017 0.7571455 [,8] [1,] 0.7524215 [2,] 0.7532907 [3,] 0.7532907 [4,] 0.7532907 > > > x <- rmbbefd(n, a=2, b=1/2) > c(mean(x), mbbefd:::tmean1(dmbbefd, a=2, b=1/2), + mbbefd:::tmean2(pmbbefd, a=2, b=1/2), + mbbefd:::tmean3(ecmbbefd, a=2, b=1/2)) [1] 0.7931214 0.7891032 0.7891032 0.7891032 > > > x <- rmbbefd(n, a=-1/2, b=3) > c(mean(x), mbbefd:::tmean1(dmbbefd, a=-1/2, b=3), + mbbefd:::tmean2(pmbbefd, a=-1/2, b=3), + mbbefd:::tmean3(ecmbbefd, a=-1/2, b=3)) [1] 0.7305568 0.7324868 0.7324868 0.7324867 > > proc.time() user system elapsed 1.90 0.31 2.20