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 > > data(lossalaefull) > x <- lossalaefull$Loss/lossalaefull$Limit > > > # fitDR(x, "oigbeta", method="mle", control=list(trace=1, REPORT=1)) > > dlist <- c("oistpareto", "oibeta", "oigbeta") > flist <- lapply(dlist, function(d) {print(d); + fitDR(x, d, method="mle")}) [1] "oistpareto" [1] "oibeta" [1] "oigbeta" > names(flist) <- dlist > > gof1 <- gofstat(flist) > > mm <- rbind(KS = gof1$ks, CvM = gof1$cvm, AD = gof1$ad, AIC = gof1$aic, BIC = gof1$bic) > rownames(mm) <- c("Kolmogorov-Smirnov statistic", "Cramer-von Mises statistic", + "Anderson-Darling statistic", "Aikake's Information Criterion", "Bayesian Information Criterion") > > > cdfcomp(flist, do.points=FALSE, leg=dlist, addlegend = FALSE, fitlwd=1.5, main="Emp./theo. CDFs - insurance") > legend("topleft", col=c("red", "green", "blue"), leg=dlist, lty=1:3, lwd=2, bty="n") > > > par(mar=c(4,4,2,1)) > cdfcomp(flist, do.points=FALSE, leg=dlist, xlogscale = TRUE, addlegend = FALSE, fitlwd=1.5, main="Emp./theo. CDFs - insurance") > legend("topleft", col=c("red", "green", "blue"), leg=dlist, lty=1:3, lwd=2, bty="n") > > eccomp(flist, leg=dlist, do.points = FALSE, addlegend = FALSE, lwd=1.5) > legend("topleft", col=c("red", "green", "blue"), leg=dlist, lty=1:3, lwd=2, bty="n") > > ppcomp(flist, leg=dlist, fitpch=".", addlegend = FALSE) > legend("bottomright", fill=c("red", "green", "blue", "cyan", "purple"), leg=dlist) > > > qqcomp(flist, leg=dlist, use.ppoints=TRUE) Warning messages: 1: In qfun(p, lower.tail = TRUE, log.p = FALSE, ...) : NaNs produced 2: In qbeta(p, shape1, shape2, lower.tail = TRUE, log.p = FALSE) : NaNs produced > > proc.time() user system elapsed 2.62 0.39 3.00