R Under development (unstable) (2025-07-02 r88374 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 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(actuar) Loading required package: actuar Attaching package: 'actuar' The following objects are masked from 'package:stats': sd, var The following object is masked from 'package:grDevices': cm > require(fitdistrplus) Loading required package: fitdistrplus Loading required package: MASS Loading required package: survival > n <- 1e4 > > truescale <- 100 > trueshape1 <- pi > > if(FALSE) + { + plot(ecdf(rburr(n, trueshape1, 2, scale=truescale))) + lines(ecdf(1/rinvburr(n, trueshape1, 2, scale=1/truescale)), col="red") + + curve(pburr(x, trueshape1, 2, scale=truescale), from=0, to=5*truescale) + curve(pinvburr(1/x, trueshape1, 2, scale=1/truescale, lower=FALSE), add=TRUE, col="red") + } > > z <- rburr(n, trueshape1, 2, scale=truescale) > y <- 1/z > fit_y_IB <- fitdist(y, "invburr") > mytitle <- paste("fitted Inv. Burr", paste(signif(coef(fit_y_IB), 3), collapse= ", ")) > myleg <- paste("theo. Inv. Burr", paste(signif(c(trueshape1, 2, 1/truescale), 3), collapse= ", ")) > cdfcomp(fit_y_IB, xlogscale = TRUE, do.points = FALSE, addlegend = FALSE, main=mytitle) > curve(pinvburr(x, trueshape1, 2, scale=1/truescale), add=TRUE, col="green") > legend("topleft", lty=1, col=c("black", "red", "green"), + c("empirical", "fitted", myleg)) > > > y <- rinvburr(n, trueshape1, 2, scale=1/truescale) > fit_y_IB <- fitdist(y, "invburr") > mytitle <- paste("fitted Inv. Burr", paste(signif(coef(fit_y_IB), 3), collapse= ", ")) > myleg <- paste("theo. Inv. Burr", paste(signif(c(trueshape1, 2, 1/truescale), 3), collapse= ", ")) > cdfcomp(fit_y_IB, xlogscale = TRUE, do.points = FALSE, addlegend = FALSE, main=mytitle) > curve(pinvburr(x, trueshape1, 2, scale=1/truescale), add=TRUE, col="green") > legend("topleft", lty=1, col=c("black", "red", "green"), + c("empirical", "fitted", myleg)) > > > > > > proc.time() user system elapsed 5.93 0.43 6.45