Running ‘t-CIcdfplot.R’ [8s/11s]
  Running ‘t-bootdist.R’ [9s/10s]
  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’
  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’
  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’
  Running ‘t-mledist-paramsupport.R’
  Running ‘t-mmedist.R’ [9s/11s]
  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’ [14s/17s]
  Running ‘t-qmedist.R’ [11s/15s]
  Running ‘t-qqcomp.R’ [9s/13s]
  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-mledist-paramsupport.R’ failed.
Complete output:
  > library(fitdistrplus)
  Loading required package: MASS
  Loading required package: survival
  > 
  > 
  > 
  > set.seed(1234)
  > nsample <- 10
  > 
  > 
  > # (1) uniform distribution fit - no fixed value
  > 
  > #manual check
  > dunif2 <- function(x, min, max)
  +   dunif(x, min, max)
  > punif2 <- function(q, min, max)
  +   punif(q, min, max)
  > 
  > x1 <- runif(nsample, 3, 5)
  > 
  > L <- function(a, b, obs)
  +   prod(dunif(obs, min=a, max=b))
  > l <- Vectorize(L, "a")
  > curve(l(x, b=5, obs=x1), from=1, to=3)
  > 
  > f1 <- fitdist(x1, "unif")
  $start.arg
  $start.arg$min
  [1] 0
  
  $start.arg$max
  [1] 1
  
  
  $fix.arg
  NULL
  
  > f2 <- fitdist(x1, "unif2", start=list(min=0, max=10), lower=c(-Inf, max(x1)),
  +               upper=c(min(x1), Inf))
  $start.arg
  $start.arg$min
  [1] 0
  
  $start.arg$max
  [1] 10
  
  
  $fix.arg
  NULL
  
  > c(logLik(f1), logLik(f2))
  [1] -5.322970 -5.323165
  > 
  > delta <- .2
  > llsurface(x1, "unif", plot.arg = c("min", "max"), min.arg=c(1, 5-delta),
  +           max.arg=c(3+delta, 7), main="likelihood surface for uniform")
  > abline(v=3, h=5, col="red", lty=2)
  > points(f1$estimate[1], f1$estimate[2], pch="x", col="violet")
  > points(f2$estimate[1], f2$estimate[2], pch="o", col="blue")
  > 
  > # (2) uniform distribution fit - fixed value
  > 
  > f3 <- fitdist(x1, "unif", fix.arg=list(min=2.5))
  $start.arg
  $start.arg$max
  [1] 1
  
  
  $fix.arg
  $fix.arg$min
  [1] 2.5
  
  
  > logLik(f3)
  [1] -7.983315
  > 
  > llcurve(x1, "unif", plot.arg="max", min.arg = 5-delta, max.arg=7)
  > 
  > f4 <- fitdist(x1, "unif", fix.arg=list(max=5.5))
  $start.arg
  $start.arg$min
  [1] 0
  
  
  $fix.arg
  $fix.arg$max
  [1] 5.5
  
  
  > logLik(f4)
  [1] -9.086651
  > 
  > 
  > # (3) four parameter beta - also known as PERT distribution
  > require(mc2d)
  Loading required package: mc2d
  Loading required package: mvtnorm
  
  Attaching package: 'mc2d'
  
  The following objects are masked from 'package:base':
  
      pmax, pmin
  
  > 
  > x2 <- rpert(2*nsample, 0, 1, 2, 3)
  > 
  > f1 <- fitdist(x2, "pert", start=list(min=-1, mode=0, max=10, shape=1),
  +               lower=c(-Inf, -Inf, max(x2), 0),
  +               upper=c(min(x2), Inf, Inf, Inf))
  Error in fitdist(x2, "pert", start = list(min = -1, mode = 0, max = 10,  : 
    data must be a numeric vector of length greater than 1
  Execution halted