Running ‘t-CIcdfplot.R’ [16s/22s]
  Running ‘t-Surv2fitdistcens.R’
  Running ‘t-bootdist.R’ [16s/20s]
  Running ‘t-bootdistcens.R’
  Running ‘t-cdfcomp.R’
  Running ‘t-cdfcompcens.R’
  Running ‘t-cvg-algo.R’
  Running ‘t-denscomp.R’
  Running ‘t-descdist.R’
  Running ‘t-detectbound.R’
  Running ‘t-fitbench.R’
  Running ‘t-fitdist-customoptim.R’
  Running ‘t-fitdist.R’ [14s/18s]
  Running ‘t-fitdistcens.R’
  Running ‘t-gen-max-spacing-estim.R’
  Running ‘t-getparam.R’
  Running ‘t-gofstat.R’
  Running ‘t-init-actuar.R’
  Running ‘t-llplot.R’ [13s/18s]
  Running ‘t-lnL-surf.R’
  Running ‘t-logLik-vcov-coef.R’
  Running ‘t-manageparam.R’
  Running ‘t-mgedist.R’
  Running ‘t-mledist-cens.R’
  Running ‘t-mledist-nocens.R’ [13s/16s]
  Running ‘t-mledist-paramsupport.R’
  Running ‘t-mmedist.R’ [17s/20s]
  Running ‘t-msedist.R’
  Running ‘t-parallel.R’
  Running ‘t-plotdist.R’
  Running ‘t-plotdistcens.R’
  Running ‘t-ppcomp.R’
  Running ‘t-ppcompcens.R’
  Running ‘t-prefit.R’
  Running ‘t-qme-discrete.R’ [13s/15s]
  Running ‘t-qmedist.R’ [9s/12s]
  Running ‘t-qqcomp.R’
  Running ‘t-qqcompcens.R’
  Running ‘t-quantiledist.R’
  Running ‘t-startfixarg-overall.R’
  Running ‘t-startingvalues.R’
  Running ‘t-util-npmle.R’
  Running ‘t-util-npsurv-mainfunction.R’
  Running ‘t-util-testdensity.R’
  Running ‘t-weird-ppcomp-cens.R’
  Running ‘t-weird-qqcomp-cens.R’
Running the tests in ‘tests/t-CIcdfplot.R’ failed.
Complete output:
  > library(fitdistrplus)
  Loading required package: MASS
  Loading required package: survival
  > 
  > nbboot <- 201
  > nbboot <- 10
  > if (requireNamespace ("ggplot2", quietly = TRUE)) {ggplotEx <- TRUE}
  > 
  > # (1) Fit of a gamma distribution 
  > #
  > 
  > set.seed(123)
  > s1 <- rgamma(20, 3, 2)
  > f1 <- fitdist(s1, "gamma")
  > b1 <- bootdist(f1, niter=nbboot, silent=TRUE)
  > 
  > plot(b1)
  > quantile(b1)
  (original) estimated quantiles for each specified probability (non-censored data)
               p=0.1    p=0.2     p=0.3    p=0.4   p=0.5    p=0.6    p=0.7
  estimate 0.4742226 0.672897 0.8486169 1.022154 1.20499 1.408707 1.650739
              p=0.8    p=0.9
  estimate 1.966843 2.466269
  Median of bootstrap estimates
               p=0.1     p=0.2     p=0.3    p=0.4    p=0.5    p=0.6    p=0.7
  estimate 0.5083059 0.6866909 0.8522568 1.018742 1.200786 1.384358 1.577513
              p=0.8    p=0.9
  estimate 1.797666 2.213844
  
  two-sided 95 % CI of each quantile
             p=0.1     p=0.2     p=0.3     p=0.4     p=0.5    p=0.6    p=0.7
  2.5 %  0.3930866 0.5545204 0.6866101 0.8156534 0.9504778 1.099636 1.275705
  97.5 % 0.7636623 0.9342928 1.0731198 1.2027355 1.3333688 1.479356 1.762055
            p=0.8    p=0.9
  2.5 %  1.498104 1.827576
  97.5 % 2.151721 2.778154
  > 
  > par(mfrow=c(1,2))
  > CIcdfplot(b1, CI.level=95/100, CI.output = "probability", CI.fill="grey80", CI.col="black")
  > CIcdfplot(b1, CI.level=95/100, CI.output = "quantile", datacol="blue")
  > if(ggplotEx) CIcdfplot(b1, CI.level=95/100, CI.output = "probability", CI.fill="grey80", CI.col="black", plotstyle = "ggplot")
  > if(ggplotEx) CIcdfplot(b1, CI.level=95/100, CI.output = "quantile", datacol="blue", plotstyle = "ggplot")
  >   
  > par(mfrow=c(1,2))
  > CIcdfplot(b1, CI.level=85/100, CI.output = "probability")
  > CIcdfplot(b1, CI.level=85/100, CI.output = "quantile")
  > if(ggplotEx) CIcdfplot(b1, CI.level=85/100, CI.output = "probability", plotstyle = "ggplot")
  > if(ggplotEx) CIcdfplot(b1, CI.level=85/100, CI.output = "quantile", plotstyle = "ggplot")
  > 
  > par(mfrow=c(1,2))
  > CIcdfplot(b1, CI.level=90/100, CI.output = "probability")
  > CIcdfplot(b1, CI.level=90/100, CI.output = "quantile", CI.col="black", CI.type = "less", 
  +           CI.fill="grey85", verticals=TRUE, datacol="blue", do.points=FALSE)
  > if(ggplotEx) CIcdfplot(b1, CI.level=90/100, CI.output = "probability", plotstyle = "ggplot")
  > if(ggplotEx) CIcdfplot(b1, CI.level=90/100, CI.output = "quantile", CI.col="black", CI.type = "less", 
  +           CI.fill="grey85", verticals=TRUE, datacol="blue", do.points=FALSE, plotstyle = "ggplot")
  > 
  > par(mfrow=c(1,2))
  > CIcdfplot(b1, CI.level=90/100, CI.output = "probability", CI.type = "greater")
  > CIcdfplot(b1, CI.level=90/100, CI.output = "quantile", CI.col="black", CI.type = "greater", 
  +           CI.fill="grey90", datacol="blue", datapch=21)
  > if(ggplotEx) CIcdfplot(b1, CI.level=90/100, CI.output = "probability", CI.type = "greater", plotstyle = "ggplot")
  > if(ggplotEx) CIcdfplot(b1, CI.level=90/100, CI.output = "quantile", CI.col="black", CI.type = "greater", 
  +           CI.fill="grey90", datacol="blue", datapch=21, plotstyle = "ggplot")
  > 
  > par(mfrow=c(1,1))
  > CIcdfplot(b1, CI.level=90/100, CI.output = "probability", CI.col="black", CI.type = "less", CI.fill="grey90")
  > CIcdfplot(b1, CI.level=90/100, CI.output = "quantile", CI.col="black", CI.type = "less", CI.fill="grey90", 
  +           verticals=TRUE, datacol="blue", do.points=FALSE)
  > CIcdfplot(b1, CI.level=90/100, CI.output = "quantile", CI.col="grey90", CI.type = "less", CI.fill="grey90", 
  +           verticals=TRUE, datacol="blue", do.points=FALSE, CI.only=TRUE)
  > CIcdfplot(b1, CI.level=90/100, CI.output = "probability", CI.col="grey85", CI.type = "less", CI.fill="grey90", 
  +           CI.only = TRUE)
  > CIcdfplot(b1, CI.output = "probability", fitlty=3, fitlwd=4)
  > 
  > if(ggplotEx) CIcdfplot(b1, CI.level=90/100, CI.output = "probability", CI.col="black", CI.type = "less", CI.fill="grey90", plotstyle = "ggplot")
  > if(ggplotEx) CIcdfplot(b1, CI.level=90/100, CI.output = "quantile", CI.col="black", CI.type = "less", CI.fill="grey90", 
  +           verticals=TRUE, datacol="blue", do.points=FALSE, plotstyle = "ggplot")
  > if(ggplotEx) CIcdfplot(b1, CI.level=90/100, CI.output = "quantile", CI.col="grey90", CI.type = "less", CI.fill="grey90", 
  +           verticals=TRUE, datacol="blue", do.points=FALSE, CI.only=TRUE, plotstyle = "ggplot")
  > if(ggplotEx) CIcdfplot(b1, CI.level=90/100, CI.output = "probability", CI.col="grey85", CI.type = "less", CI.fill="grey90", 
  +           CI.only = TRUE, plotstyle = "ggplot")
  > if(ggplotEx) CIcdfplot(b1, CI.output = "probability", fitlty=3, fitlwd=4, plotstyle = "ggplot")
  > 
  > # (2) an example from ecotoxicology
  > # with censored data
  > #
  > data(salinity)
  > log10LC50 <-log10(salinity)
  > fln <- fitdistcens(log10LC50,"norm")
  Error in mledist(censdata, distname, start = arg_startfix$start.arg, fix.arg = arg_startfix$fix.arg,  : 
    data must be a numeric vector of length greater than 1 for non censored data or a dataframe with two columns named left and right and more than one line for censored data
  Calls: fitdistcens -> mledist
  Execution halted
Running the tests in ‘tests/t-Surv2fitdistcens.R’ failed.
Complete output:
  > require(fitdistrplus)
  Loading required package: fitdistrplus
  Loading required package: MASS
  Loading required package: survival
  > data("fremale")
  > 
  > # fremale test
  > 
  > fremale.cens <- Surv2fitdistcens(fremale$AgeIn, fremale$AgeOut, fremale$Death)
  Warning message:
  In Surv2fitdistcens(fremale$AgeIn, fremale$AgeOut, fremale$Death) :
    time2 is not used with type 'right' and 'left' 
  > 
  > 
  > f1 <- fitdistcens(fremale.cens, "norm")
  Error in mledist(censdata, distname, start = arg_startfix$start.arg, fix.arg = arg_startfix$fix.arg,  : 
    data must be a numeric vector of length greater than 1 for non censored data or a dataframe with two columns named left and right and more than one line for censored data
  Calls: fitdistcens -> mledist
  Execution halted
Running the tests in ‘tests/t-bootdistcens.R’ failed.
Complete output:
  > library(fitdistrplus)
  Loading required package: MASS
  Loading required package: survival
  > nbboot <- 101
  > nbboot <- 11
  > nsample <- 10
  > visualize <- FALSE # TRUE for manual tests with visualization of results
  > 
  > # (1) Fit of a normal distribution to fluazinam data in log10
  > # followed by nonparametric bootstrap
  > #
  > data(fluazinam)
  > (d1 <-log10(fluazinam))
          left     right
  1  0.5797836 0.5797836
  2  1.5263393 1.5263393
  3  1.9395193 1.9395193
  4  3.2304489        NA
  5  2.8061800 2.8061800
  6  3.0625820        NA
  7  2.0530784 2.0530784
  8  2.1105897 2.1105897
  9  2.7678976 2.7678976
  10 3.2685780        NA
  11 0.2041200 0.2041200
  12 0.6812412 0.6812412
  13 1.9138139 1.9138139
  14 2.1903317 2.1903317
  > f1 <- fitdistcens(d1, "norm")
  Error in mledist(censdata, distname, start = arg_startfix$start.arg, fix.arg = arg_startfix$fix.arg,  : 
    data must be a numeric vector of length greater than 1 for non censored data or a dataframe with two columns named left and right and more than one line for censored data
  Calls: fitdistcens -> mledist
  Execution halted
Running the tests in ‘tests/t-cdfcompcens.R’ failed.
Complete output:
  > library(fitdistrplus)
  Loading required package: MASS
  Loading required package: survival
  > 
  > visualize <- FALSE # TRUE for manual tests with visualization of results
  > 
  > # (1) Plot various distributions fitted to bacterial contamination data
  > #
  > data(smokedfish)
  > Clog10 <- log10(smokedfish)
  > 
  > fitsfn <- fitdistcens(Clog10,"norm")
  Error in mledist(censdata, distname, start = arg_startfix$start.arg, fix.arg = arg_startfix$fix.arg,  : 
    data must be a numeric vector of length greater than 1 for non censored data or a dataframe with two columns named left and right and more than one line for censored data
  Calls: fitdistcens -> mledist
  Execution halted
Running the tests in ‘tests/t-fitdistcens.R’ failed.
Complete output:
  > library(fitdistrplus)
  Loading required package: MASS
  Loading required package: survival
  > 
  > nsample <- 500
  > nsample <- 10
  > visualize <- FALSE # TRUE for manual tests with visualization of results
  > set.seed(1234)
  > 
  > # (6) custom optimisation function - example with the genetic algorithm
  > #
  > data(fluazinam)
  > log10EC50 <-log10(fluazinam)
  > 
  >   #wrap genoud function rgenoud package
  >   mygenoud  <-  function(fn, par, ...) 
  +   {
  +     require(rgenoud)
  +     res  <-  genoud(fn, starting.values=par, ...)        
  +     standardres  <-  c(res, convergence=0)
  +     
  +     return(standardres)
  +   }
  >   
  >   # call fitdistcens with a 'custom' optimization function
  >   fit.with.genoud <- fitdistcens(log10EC50, "logis", custom.optim=mygenoud, nvars=2, 
  +                                  start=list(location=0, scale=1),    
  +                                  Domains=cbind(c(0,0), c(5, 5)), boundary.enforcement=1, 
  +                                  print.level=1, hessian=TRUE)
  Error in mledist(censdata, distname, start = arg_startfix$start.arg, fix.arg = arg_startfix$fix.arg,  : 
    data must be a numeric vector of length greater than 1 for non censored data or a dataframe with two columns named left and right and more than one line for censored data
  Calls: fitdistcens -> mledist
  Execution halted
Running the tests in ‘tests/t-logLik-vcov-coef.R’ failed.
Complete output:
  > library(fitdistrplus)
  Loading required package: MASS
  Loading required package: survival
  > 
  > # (1) basic fit of a gamma distribution by maximum likelihood estimation
  > #
  > data(groundbeef)
  > serving <- groundbeef$serving
  > fitg <- fitdist(serving, "gamma")
  > 
  > logLik(fitg)
  [1] -1253.625
  > vcov(fitg)
              shape         rate
  shape 0.116510296 1.580943e-03
  rate  0.001580943 2.435884e-05
  > coef(fitg)
       shape       rate 
  4.00825257 0.05441911 
  > 
  > fitg <- fitdist(serving, "gamma", method="mme")
  > 
  > logLik(fitg)
  [1] -1253.825
  > vcov(fitg) 
  NULL
  Warning message:
  In vcov.fitdist(fitg) :
    The variance-covariance matrix can only be calculated for fits using the mle method
  > coef(fitg)
       shape       rate 
  4.22848617 0.05741663 
  > 
  > # (2) Fit of a lognormal distribution to bacterial contamination data
  > #
  > data(smokedfish)
  > fitsf  <-  fitdistcens(smokedfish,"lnorm")
  Error in mledist(censdata, distname, start = arg_startfix$start.arg, fix.arg = arg_startfix$fix.arg,  : 
    data must be a numeric vector of length greater than 1 for non censored data or a dataframe with two columns named left and right and more than one line for censored data
  Calls: fitdistcens -> mledist
  Execution halted
Running the tests in ‘tests/t-mledist-cens.R’ failed.
Complete output:
  > library(fitdistrplus)
  Loading required package: MASS
  Loading required package: survival
  > 
  > 
  > 
  > 
  > # (1) fit a user-defined continuous distribution (Gumbel) to censored data.
  > #
  > 
  > data(fluazinam)
  > log10EC50 <-log10(fluazinam)
  > # definition of the Gumbel distribution
  > dgumbel  <-  function(x,a,b) 1/b*exp((a-x)/b)*exp(-exp((a-x)/b))
  > pgumbel  <-  function(q,a,b) exp(-exp((a-q)/b))
  > qgumbel  <-  function(p,a,b) a-b*log(-log(p))
  > 
  > mledist(log10EC50, "gumbel", start=list(a=0,b=2), optim.method="Nelder-Mead")
  Error in mledist(log10EC50, "gumbel", start = list(a = 0, b = 2), optim.method = "Nelder-Mead") : 
    data must be a numeric vector of length greater than 1 for non censored data or a dataframe with two columns named left and right and more than one line for censored data
  Execution halted
Running the tests in ‘tests/t-plotdistcens.R’ failed.
Complete output:
  > library(fitdistrplus)
  Loading required package: MASS
  Loading required package: survival
  > 
  > # (1) Plot of an empirical censored distribution (censored data) as a CDF
  > # using the default Turnbull method
  > #
  > data(smokedfish)
  > plotdistcens(smokedfish)
  > d1 <- as.data.frame(log10(smokedfish))
  > plotdistcens(d1)
  > 
  > 
  > # (2) Add the CDF of a normal distribution and QQ and PP plots
  > #
  > plotdistcens(smokedfish,"lnorm", para=list(meanlog=-3.6,sdlog=3.5))
  > plotdistcens(d1,"norm", para=list(mean=-1.6,sd=1.5))
  > 
  > # (3) Various plots of the same empirical distribution 
  > #
  > # default Wang plot
  > plotdistcens(d1, NPMLE = TRUE, NPMLE.method = "Wang")
  > plotdistcens(d1, NPMLE = TRUE, NPMLE.method = "Wang", lwd = 3, main = "Wang ECDF plot")
  > # Turnbull plot
  > plotdistcens(d1, NPMLE = TRUE, NPMLE.method = "Turnbull", col = "red", 
  +              main = "Turnbull ECDF plot")
  Warning message:
  In plotdistcens(d1, NPMLE = TRUE, NPMLE.method = "Turnbull", col = "red",  :
    Turnbull is now a deprecated option for NPMLE.method. You should use Turnbull.middlepoints
              of Turnbull.intervals. It was here fixed as Turnbull.middlepoints, equivalent to former Turnbull.
  > plotdistcens(d1,Turnbull = TRUE) # deprecated way to do it
  Warning message:
  In plotdistcens(d1, Turnbull = TRUE) :
    When Turnbull.confint is TRUE NPMLE.method is forced to Turnbull.middlepoints.
  > # Turnbull plot with confidence intervals
  > plotdistcens(d1,NPMLE = TRUE, NPMLE.method = "Turnbull", Turnbull.confint = TRUE)
  Warning message:
  In plotdistcens(d1, NPMLE = TRUE, NPMLE.method = "Turnbull", Turnbull.confint = TRUE) :
    Turnbull is now a deprecated option for NPMLE.method. You should use Turnbull.middlepoints
              of Turnbull.intervals. It was here fixed as Turnbull.middlepoints, equivalent to former Turnbull.
  > plotdistcens(d1,Turnbull = TRUE,Turnbull.confint = TRUE) # deprecated way to do it
  Warning messages:
  1: In plotdistcens(d1, Turnbull = TRUE, Turnbull.confint = TRUE) :
    When Turnbull.confint is TRUE NPMLE.method is forced to Turnbull.middlepoints.
  2: In plot.window(...) : "Turnbull" is not a graphical parameter
  3: In plot.xy(xy, type, ...) : "Turnbull" is not a graphical parameter
  4: In axis(side = side, at = at, labels = labels, ...) :
    "Turnbull" is not a graphical parameter
  5: In axis(side = side, at = at, labels = labels, ...) :
    "Turnbull" is not a graphical parameter
  6: In box(...) : "Turnbull" is not a graphical parameter
  7: In title(...) : "Turnbull" is not a graphical parameter
  > # with intervals and points
  > plotdistcens(d1,NPMLE = FALSE)
  > plotdistcens(d1,NPMLE = FALSE, col = "red", lwd = 2)
  > plotdistcens(d1,rightNA=3, NPMLE = FALSE)
  > plotdistcens(d1,rightNA=3, Turnbull = FALSE) # deprecated way to do it
  > # with intervals and points
  > # defining a minimum value for left censored values
  > plotdistcens(d1,leftNA=-3, NPMLE = FALSE)
  > 
  > # (4) Goodness-of-fit plots for the same dataset after logarithmic transformation
  > #   with a lognormal distribution, successively using the three proposed methods
  > #
  > d3 <- smokedfish
  > plotdistcens(d3,"lnorm",para=list(meanlog=-3.6,sdlog=3.5), main = "Wang plot")
  > plotdistcens(d3,"lnorm",para=list(meanlog=-3.6,sdlog=3.5), 
  +              NPMLE.method = "Turnbull", main = "Turnbull plot")
  Warning messages:
  1: In plotdistcens(d3, "lnorm", para = list(meanlog = -3.6, sdlog = 3.5),  :
    Turnbull is now a deprecated option for NPMLE.method. You should use Turnbull.middlepoints
              of Turnbull.intervals. It was here fixed as Turnbull.middlepoints, equivalent to former Turnbull.
  2: In plotdistcens(d3, "lnorm", para = list(meanlog = -3.6, sdlog = 3.5),  :
    Q-Q plot and P-P plot are available only  
              with the arguments NPMLE.method at Wang (default value) or Turnbull.intervals.
  > plotdistcens(d3,"lnorm",para=list(meanlog=-3.6,sdlog=3.5),
  +              NPMLE = FALSE, leftNA=0, main = "Plot of ordered intervals")
  Warning message:
  In plotdistcens(d3, "lnorm", para = list(meanlog = -3.6, sdlog = 3.5),  :
    When NPMLE is FALSE the nonparametric maximum likelihood estimation 
              of the cumulative distribution function is not computed.
              Q-Q plot and P-P plot are available only with the arguments NPMLE.method at Wang 
              (default value) or Turnbull.intervals.
  > 
  > # Test with the salinity data set
  > #
  > data(salinity)
  > log10LC50 <-log10(salinity)
  > plotdistcens(log10LC50)
  > plotdistcens(log10LC50, NPMLE.method = "Turnbull")
  Warning message:
  In plotdistcens(log10LC50, NPMLE.method = "Turnbull") :
    Turnbull is now a deprecated option for NPMLE.method. You should use Turnbull.middlepoints
              of Turnbull.intervals. It was here fixed as Turnbull.middlepoints, equivalent to former Turnbull.
  > plotdistcens(log10LC50, NPMLE = FALSE)
  > fn <- fitdistcens(log10LC50,"norm")
  Error in mledist(censdata, distname, start = arg_startfix$start.arg, fix.arg = arg_startfix$fix.arg,  : 
    data must be a numeric vector of length greater than 1 for non censored data or a dataframe with two columns named left and right and more than one line for censored data
  Calls: fitdistcens -> mledist
  Execution halted
Running the tests in ‘tests/t-ppcompcens.R’ failed.
Complete output:
  > 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")
  Error in mledist(censdata, distname, start = arg_startfix$start.arg, fix.arg = arg_startfix$fix.arg,  : 
    data must be a numeric vector of length greater than 1 for non censored data or a dataframe with two columns named left and right and more than one line for censored data
  Calls: fitdistcens -> mledist
  Execution halted
Running the tests in ‘tests/t-qqcompcens.R’ failed.
Complete output:
  > 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")
  Error in mledist(censdata, distname, start = arg_startfix$start.arg, fix.arg = arg_startfix$fix.arg,  : 
    data must be a numeric vector of length greater than 1 for non censored data or a dataframe with two columns named left and right and more than one line for censored data
  Calls: fitdistcens -> mledist
  Execution halted
Running the tests in ‘tests/t-quantiledist.R’ failed.
Complete output:
  > library(fitdistrplus)
  Loading required package: MASS
  Loading required package: survival
  > nbboot <- 1001
  > nbboot <- 10
  > 
  > 
  > # (1) Fit of a normal distribution on acute toxicity log-transformed values of endosulfan for
  > # nonarthropod invertebrates, using maximum likelihood estimation
  > # to estimate what is called a species sensitivity distribution 
  > # (SSD) in ecotoxicology, followed by estimation of the 5, 10 and 20 percent quantile values of 
  > # the fitted distribution, which are called the 5, 10, 20 percent hazardous concentrations (HC5, HC10, HC20)
  > # in ecotoxicology, followed with calculations of their confidence intervals with various definitions.
  > #
  > data(endosulfan)
  > ATV <- subset(endosulfan, group == "NonArthroInvert")$ATV
  > log10ATV <- log10(subset(endosulfan, group == "NonArthroInvert")$ATV)
  > fln <- fitdist(log10ATV, "norm")
  > quantile(fln, probs = c(0.05, 0.1, 0.2))
  Estimated quantiles for each specified probability (non-censored data)
             p=0.05    p=0.1  p=0.2
  estimate 1.744227 2.080093 2.4868
  > bln <- bootdist(fln, niter=nbboot, bootmethod="param")
  > quantile(bln, probs = c(0.05, 0.1, 0.2))
  (original) estimated quantiles for each specified probability (non-censored data)
             p=0.05    p=0.1  p=0.2
  estimate 1.744227 2.080093 2.4868
  Median of bootstrap estimates
             p=0.05    p=0.1    p=0.2
  estimate 2.007958 2.315534 2.687983
  
  two-sided 95 % CI of each quantile
           p=0.05    p=0.1    p=0.2
  2.5 %  1.417345 1.786320 2.233120
  97.5 % 2.388773 2.670206 3.018833
  > quantile(bln, probs = c(0.05, 0.1, 0.2), CI.type = "greater")
  (original) estimated quantiles for each specified probability (non-censored data)
             p=0.05    p=0.1  p=0.2
  estimate 1.744227 2.080093 2.4868
  Median of bootstrap estimates
             p=0.05    p=0.1    p=0.2
  estimate 2.007958 2.315534 2.687983
  
  left bound of one-sided  95 %  CI of each quantile
       p=0.05   p=0.1   p=0.2
  5 % 1.47384 1.83862 2.28034
  > quantile(bln, probs = c(0.05, 0.1, 0.2), CI.level = 0.9)
  (original) estimated quantiles for each specified probability (non-censored data)
             p=0.05    p=0.1  p=0.2
  estimate 1.744227 2.080093 2.4868
  Median of bootstrap estimates
             p=0.05    p=0.1    p=0.2
  estimate 2.007958 2.315534 2.687983
  
  two-sided 90 % CI of each quantile
         p=0.05    p=0.1    p=0.2
  5 %  1.473840 1.838620 2.280340
  95 % 2.372645 2.645098 2.990685
  > 
  > # (2) Fit of a distribution on acute salinity log-transformed tolerance 
  > # for riverine macro-invertebrates, using maximum likelihood estimation
  > # to estimate what is called a species sensitivity distribution 
  > # (SSD) in ecotoxicology, followed by estimation of the 5, 10 and 20 percent quantile values of 
  > # the fitted distribution, which are called the 5, 10, 20 percent hazardous concentrations (HC5, HC10, HC20)
  > # in ecotoxicology, followed with calculations of their confidence intervals with various definitions.
  > #
  > data(salinity)
  > log10LC50 <-log10(salinity)
  > flncens <- fitdistcens(log10LC50,"norm")
  Error in mledist(censdata, distname, start = arg_startfix$start.arg, fix.arg = arg_startfix$fix.arg,  : 
    data must be a numeric vector of length greater than 1 for non censored data or a dataframe with two columns named left and right and more than one line for censored data
  Calls: fitdistcens -> mledist
  Execution halted
Running the tests in ‘tests/t-startfixarg-overall.R’ failed.
Complete output:
  > library(fitdistrplus)
  Loading required package: MASS
  Loading required package: survival
  > 
  > # (1) non-censored data (continuous)
  > #
  > 
  > s1 <- NULL
  > s2 <- list("mean"=2)
  > s0 <- list("mean"=2, "sd"=1)
  > s3 <- function(x)
  +   list("mean"=1.01*mean(x)) 
  > s4 <- function(x)
  +   list("mean"=1.01*mean(x), "sd"=sd(x)) 
  > 
  > f1 <- NULL  
  > f2 <- list("sd"=3)
  > f3 <- function(x) 
  +   list("sd"=1.01*sd(x))  
  > 
  > x <- rnorm(1000)
  > 
  > #redefine normal distribution for better check
  > dnorm2 <- dnorm
  > pnorm2 <- pnorm
  > qnorm2 <- qnorm
  > rnorm2 <- rnorm
  > mnorm2 <- function(order, mean, sd)
  +   ifelse(order == 1, mean, sd^2)
  > memp  <-  function(x, order) mean(x^order)
  > 
  > # both NULL
  > mf1 <- mledist(x, "norm", start=s1, fix.arg=f1)
  > mf1 <- mmedist(x, "norm", start=s1, fix.arg=f1)
  > mf1 <- qmedist(x, "norm", start=s1, fix.arg=f1, probs=1:2/3)
  > mf1 <- mgedist(x, "norm", start=s1, fix.arg=f1)
  > 
  > fit1 <- fitdist(x, "norm", start=s1, fix.arg=f1)
  > boot1 <- bootdist(fit1, niter=10)
  > 
  > # both named list
  > mf1 <- mledist(x, "norm2", start=s2, fix.arg=f2)
  > mf1 <- mmedist(x, "norm2", start=s2, fix.arg=f2, order=1, memp=memp)
  checkstartfix is carried out
  > mf1 <- qmedist(x, "norm2", start=s2, fix.arg=f2, probs=1/3)
  > mf1 <- mgedist(x, "norm2", start=s2, fix.arg=f2)
  > 
  > fit1 <- fitdist(x, "norm2", start=s2, fix.arg=f2)
  > boot1 <- bootdist(fit1, niter=10)
  > 
  > # named list and NULL
  > mf1 <- mledist(x, "norm2", start=s0, fix.arg=f1)
  > mf1 <- mmedist(x, "norm2", start=s0, fix.arg=f1, order=1:2, memp=memp)
  checkstartfix is carried out
  > mf1 <- qmedist(x, "norm2", start=s0, fix.arg=f1, probs=1:2/3)
  > mf1 <- mgedist(x, "norm2", start=s0, fix.arg=f1)
  > 
  > fit1 <- fitdist(x, "norm2", start=s0, fix.arg=f1)
  > boot1 <- bootdist(fit1, niter=10)
  > 
  > # NULL and named list 
  > mf1 <- mledist(x, "norm", start=s1, fix.arg=f2)
  > mf1 <- qmedist(x, "norm", start=s1, fix.arg=f2, probs=1/3)
  > mf1 <- mgedist(x, "norm", start=s1, fix.arg=f2)
  > 
  > fit1 <- fitdist(x, "norm", start=s1, fix.arg=f2)
  > boot1 <- bootdist(fit1, niter=10)
  > 
  > # both function
  > mf1 <- mledist(x, "norm2", start=s3, fix.arg=f3)
  > mf1 <- mmedist(x, "norm2", start=s3, fix.arg=f3, order=1, memp=memp)
  checkstartfix is carried out
  > mf1 <- qmedist(x, "norm2", start=s3, fix.arg=f3, probs=1/3)
  > mf1 <- mgedist(x, "norm2", start=s3, fix.arg=f3)
  > 
  > fit1 <- fitdist(x, "norm2", start=s3, fix.arg=f3)
  > boot1 <- bootdist(fit1, niter=10)
  > 
  > # function and NULL
  > mf1 <- mledist(x, "norm2", start=s4, fix.arg=f1)
  > mf1 <- mmedist(x, "norm2", start=s4, fix.arg=f1, order=1:2, memp=memp)
  checkstartfix is carried out
  > mf1 <- qmedist(x, "norm2", start=s4, fix.arg=f1, probs=1:2/3)
  > mf1 <- mgedist(x, "norm2", start=s4, fix.arg=f1)
  > 
  > fit1 <- fitdist(x, "norm2", start=s4, fix.arg=f1)
  > boot1 <- bootdist(fit1, niter=10)
  > 
  > # NULL and function
  > mf1 <- mledist(x, "norm", start=s1, fix.arg=f3)
  > mf1 <- qmedist(x, "norm", start=s1, fix.arg=f3, probs=1/3)
  > mf1 <- mgedist(x, "norm", start=s1, fix.arg=f3)
  > 
  > fit1 <- fitdist(x, "norm", start=s1, fix.arg=f3)
  > boot1 <- bootdist(fit1, niter=10)
  > 
  > # should raise error for too less parameters
  > try(mgedist(x, "norm", start=s2, fix.arg=f1))
  $estimate
        mean 
  0.01530537 
  
  $convergence
  [1] 0
  
  $value
  [1] 0.04893341
  
  $hessian
           mean
  mean 184.8056
  
  $optim.function
  [1] "optim"
  
  $optim.method
  [1] "BFGS"
  
  $fix.arg
  NULL
  
  $fix.arg.fun
  NULL
  
  $weights
  NULL
  
  $counts
  function gradient 
        19        7 
  
  $optim.message
  NULL
  
  $loglik
  [1] -1414.094
  
  $gof
  [1] "CvM"
  
  Warning message:
  In checkparamlist(arg_startfix$start.arg, arg_startfix$fix.arg,  :
    Some parameter names have no starting/fixed value but have a default value: sd.
  > try(fitdist(x, "norm", start=s2, fix.arg=f1))
  Fitting of the distribution ' norm ' by maximum likelihood 
  Parameters:
          estimate Std. Error
  mean 0.006284458 0.03162278
  > # should raise error for too much parameters
  > try(mgedist(x, "norm", start=s0, fix.arg=f2))
  Error in checkparamlist(arg_startfix$start.arg, arg_startfix$fix.arg,  : 
    A distribution parameter cannot be specified both in 'start' and 'fix.arg'.
  > try(fitdist(x, "norm", start=s0, fix.arg=f2))
  Error in checkparamlist(arg_startfix$start.arg, arg_startfix$fix.arg,  : 
    A distribution parameter cannot be specified both in 'start' and 'fix.arg'.
  > # should raise error for NA value
  > try(mgedist(x, "norm", start=s1, fix.arg=list(sd=NA)))
  Error in checkparamlist(arg_startfix$start.arg, arg_startfix$fix.arg,  : 
    'fix.arg' should not have NA or NaN values.
  > try(fitdist(x, "norm", start=list(sd=NA)))
  Error in checkparamlist(arg_startfix$start.arg, arg_startfix$fix.arg,  : 
    'start' should not have NA or NaN values.
  > # should raise error for inconsistent parameter
  > try(mgedist(x, "norm", start=function(x) list("toto"=1)))
  Error in checkparamlist(arg_startfix$start.arg, arg_startfix$fix.arg,  : 
    'start' must specify names which are arguments to 'distr'.
  > try(fitdist(x, "norm", fix=list(toto=2)))
  Error in checkparamlist(arg_startfix$start.arg, arg_startfix$fix.arg,  : 
    'fix.arg' must specify names which are arguments to 'distr'.
  > 
  > #test unset arguments
  > dbeta2<-function(x, shape1, ncp2) 
  +   dbeta(x, shape1, shape1, ncp2)
  > x <- rbeta(1e2, 3, 3)
  > try(fitdist(x, "beta2", start=list(shape1=2)))
  Error in checkparamlist(arg_startfix$start.arg, arg_startfix$fix.arg,  : 
    Some parameter names have no starting/fixed value: ncp2.
  > 
  > dbeta3<-function(x, shape1, ncp2=0) 
  +   dbeta(x, shape1, shape1, ncp2)
  > fitdist(x, "beta3", start=list(shape1=2))
  Fitting of the distribution ' beta3 ' by maximum likelihood 
  Parameters:
         estimate Std. Error
  shape1 2.617892  0.3401484
  Warning message:
  In fitdist(x, "beta3", start = list(shape1 = 2)) :
    The pbeta3 function must be defined
  > 
  > 
  > 
  > # (2) censored data
  > #
  > 
  > data(salinity)
  > log10LC50 <-log10(salinity)
  > 
  > s1 <- NULL
  > s2 <- list("mean"=2)
  > s0 <- list("mean"=2, "sd"=1)
  > s3 <- function(x) list("mean"=mean(x))
  > 
  > f1 <- NULL  
  > f2 <- list("sd"=3)
  > f3 <- function(x) list("sd"=sd(x))
  > 
  > fitdistcens(log10LC50, "norm", start=s1, fix.arg = f1)
  Error in mledist(censdata, distname, start = arg_startfix$start.arg, fix.arg = arg_startfix$fix.arg,  : 
    data must be a numeric vector of length greater than 1 for non censored data or a dataframe with two columns named left and right and more than one line for censored data
  Calls: fitdistcens -> mledist
  Execution halted