R Under development (unstable) (2024-07-10 r86888 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(fitdistrplus) Loading required package: MASS Loading required package: survival > visualize <- FALSE # TRUE for manual tests with visualization of results > > data(smokedfish) > fitsf <- fitdistcens(smokedfish,"lnorm") > plot(fitsf) > qqcompcens(fitsf) > qqcompcens(fitsf, fillrect = NA) > qqcompcens(fitsf, fitcol = "black") > qqcompcens(fitsf, fitcol = "black", fillrect = NA) > qqcompcens(fitsf, ylim = c(0,150)) Warning message: In qqcompcens(fitsf, ylim = c(0, 150)) : By default the same limits are applied to x and y axes. You should specify both if you want different x and y limits > qqcompcens(fitsf, xlim = c(0,150)) Warning message: In qqcompcens(fitsf, xlim = c(0, 150)) : By default the same limits are applied to x and y axes. You should specify both if you want different x and y limits > qqcompcens(fitsf, xlim = c(0,150), ylim = c(0, 120)) > > if (requireNamespace("ggplot2", quietly = TRUE)) { + qqcompcens(fitsf, plotstyle = "ggplot") + } > if (requireNamespace("ggplot2", quietly = TRUE) & visualize) { + qqcompcens(fitsf, fillrect = NA, plotstyle = "ggplot") + qqcompcens(fitsf, fitcol = "black", plotstyle = "ggplot") + qqcompcens(fitsf, fitcol = "black", fillrect = NA, plotstyle = "ggplot") + qqcompcens(fitsf, ylim = c(0,150), plotstyle = "ggplot") + qqcompcens(fitsf, xlim = c(0,150), plotstyle = "ggplot") + qqcompcens(fitsf, xlim = c(0,150), ylim = c(0, 120), plotstyle = "ggplot") + } > > if (visualize) + { + data(fluazinam) + log10EC50 <-log10(fluazinam) + fln <- fitdistcens(log10EC50,"norm") + plot(fln) + qqcompcens(fln) + if (requireNamespace("ggplot2", quietly = TRUE)) { + qqcompcens(fln, plotstyle = "ggplot") + } + + } > > data(salinity) > log10LC50 <-log10(salinity) > plotdistcens(log10LC50) > plotdistcens(log10LC50, NPMLE = FALSE) > fn <- fitdistcens(log10LC50,"norm") > fl <- fitdistcens(log10LC50,"logis") > plot(fn) > plot(fl) > qqcompcens(fn) > qqcompcens(fl) > qqcompcens(list(fn, fl)) > qqcompcens(list(fn, fl), fitlwd = c(5, 2)) > > if (requireNamespace("ggplot2", quietly = TRUE)) { + qqcompcens(list(fn, fl), plotstyle = "ggplot") + qqcompcens(list(fn, fl), plotstyle = "ggplot", fitlwd = c(5, 2)) + } > > if (requireNamespace("ggplot2", quietly = TRUE) & visualize) { + qqcompcens(fl, plotstyle = "ggplot") + qqcompcens(fn, plotstyle = "ggplot") + + } > > > 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 > data(salinity) > fln <- fitdistcens(salinity,"lnorm") > fll <- fitdistcens(salinity,"llogis") > plot(fln) > par(mfrow = c(2,1)) > qqcompcens(fln) > qqcompcens(fll) > par(mfrow = c(1,1)) > qqcompcens(list(fln, fll)) > qqcompcens(list(fln, fll), ynoise = FALSE) > qqcompcens(list(fln, fll), fitcol = c("blue", "orange")) > qqcompcens(list(fln, fll), xlogscale = TRUE, ylogscale = TRUE) > qqcompcens(list(fln, fll), ylogscale = TRUE) Warning message: In qqcompcens(list(fln, fll), ylogscale = TRUE) : As a Q-Q plot should use the same scale on x and y axes, both axes were put in a logarithmic scale. > qqcompcens(list(fln, fll), xlogscale = TRUE, ynoise = FALSE) Warning message: In qqcompcens(list(fln, fll), xlogscale = TRUE, ynoise = FALSE) : As a Q-Q plot should use the same scale on x and y axes, both axes were put in a logarithmic scale. > > if (requireNamespace("ggplot2", quietly = TRUE) & visualize) { + qqcompcens(list(fln, fll), plotstyle = "ggplot") + qqcompcens(list(fln, fll), ynoise = FALSE, plotstyle = "ggplot") + qqcompcens(list(fln, fll), fitcol = c("blue", "orange"), plotstyle = "ggplot") + qqcompcens(list(fln, fll), xlogscale = TRUE, ylogscale = TRUE, plotstyle = "ggplot") + qqcompcens(list(fln, fll), ylogscale = TRUE, plotstyle = "ggplot") + qqcompcens(list(fln, fll), xlogscale = TRUE, ynoise = FALSE, plotstyle = "ggplot") + } > > proc.time() user system elapsed 3.85 0.43 4.23