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) > > > #oistpareto > n <- 1e3 > nboot <- 1000 > nboot <- 10 > set.seed(12345) > x <- roistpareto(n, 2, 1/6) > > f1 <- fitDR(x, "oistpareto", method="mle") > summary(f1) Fitting of the distribution ' oistpareto ' by maximum likelihood Parameters : estimate a 1.882608 p1 0.173000 Loglikelihood: -327.1999 AIC: 658.3999 BIC: 668.2154 > summary(fitdist(x, "oistpareto", method="mle", start=list(a=1/mean(x), p1=etl(x))))#check Fitting of the distribution ' oistpareto ' by maximum likelihood Parameters : estimate Std. Error a 1.8824254 0.18115376 p1 0.1730262 0.01196233 Loglikelihood: -327.1999 AIC: 658.3999 BIC: 668.2154 Correlation matrix: a p1 a 1 0 p1 0 1 Warning message: In fitdist(x, "oistpareto", method = "mle", start = list(a = 1/mean(x), : The doistpareto function should return a vector of with NaN values when input has inconsistent values and not raise an error > > b1 <- bootDR(f1, niter=nboot) > summary(b1) Parametric bootstrap medians and 95% percentile CI Median 2.5% 97.5% a 1.988004 1.665848 2.087465 p1 0.165500 0.148575 0.196400 > > plot(b1, enhance=TRUE, trueval=c(2, 1/6)) > > hist(b1$estim[,1]) > hist(b1$estim[,2]) > > f2 <- fitDR(x, "oistpareto", method="tlmme") > summary(f2) Parameters : estimate a 1.908612 p1 0.173000 Loglikelihood: -327.2102 AIC: 658.4205 BIC: 668.236 > > gofstat(list(f1, f2)) Goodness-of-fit statistics 1-mle-oistpareto 2-tlmme-oistpareto Kolmogorov-Smirnov statistic 0.173000 0.173000 Cramer-von Mises statistic 1.791505 1.798982 Anderson-Darling statistic Inf Inf Goodness-of-fit criteria 1-mle-oistpareto 2-tlmme-oistpareto Akaike's Information Criterion 658.3999 658.4205 Bayesian Information Criterion 668.2154 668.2360 > cdfcomp(list(f1, f2), do.points=FALSE) > ppcomp(list(f1, f2)) > > proc.time() user system elapsed 1.92 0.29 2.21