Running ‘t-CIcdfplot.R’ [22s/25s]
  Running ‘t-Surv2fitdistcens.R’
  Running ‘t-bootdist.R’
  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’
  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/16s]
  Running ‘t-qmedist.R’ [9s/11s]
  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-prefit.R’ failed.
Complete output:
  > require(fitdistrplus)
  Loading required package: fitdistrplus
  Loading required package: MASS
  Loading required package: survival
  > nsample <- 10
  > 
  > # (1) gamma
  > x <- rgamma(nsample, 5/2, 7/2)
  > 
  > prefit(x, "gamma", "mle", list(shape=3, scale=3), lower=-Inf, upper=Inf, silent=TRUE, control=list(trace=1, REPORT=1))
  initial  value 7.356729 
  iter   2 value 7.353188
  iter   3 value 7.352018
  iter   4 value 7.352018
  iter   4 value 7.352018
  iter   4 value 7.352018
  final  value 7.352018 
  converged
  $shape
  [1] 2.971477
  
  $scale
  [1] 3.023294
  
  > prefit(x, "gamma", "mle", list(shape=1, scale=1), lower=-Inf, upper=Inf, silent=TRUE)
  $shape
  [1] 2.971458
  
  $scale
  [1] 3.023271
  
  > 
  > prefit(x, "gamma", "mle", list(shape=3), fix.arg=list(scale=7/2), lower=-Inf, upper=Inf, silent=TRUE)
  $shape
  [1] 0.6264889
  
  > 
  > prefit(x, "gamma", "qme", list(shape=1, scale=1), probs=1:2/3, lower=-Inf, upper=Inf, silent=TRUE)
  $shape
  [1] 1.180798
  
  $scale
  [1] 1.042208
  
  > 
  > prefit(x, "gamma", "mge", list(shape=1, scale=1), gof="CvM", lower=-Inf, upper=Inf, silent=TRUE)
  $shape
  [1] 1.98317
  
  $scale
  [1] 1.887045
  
  > prefit(x, "gamma", "mge", list(shape=1, scale=1), gof="AD", lower=-Inf, upper=Inf, silent=TRUE)
  $shape
  [1] 2.192854
  
  $scale
  [1] 2.127745
  
  > 
  > # (2) geometric
  > x <- rgeom(nsample, 1/7)
  > prefit(x, "geom", "mle", list(prob=1/2), lower=-Inf, upper=Inf, silent=TRUE)
  $prob
  [1] 0.1612903
  
  > tbx <- table(x)
  > prefit(as.numeric(names(tbx)), "geom", "mle", list(prob=1/2), lower=-Inf, upper=Inf, silent=TRUE, weights=tbx)
  $prob
  [1] 0.1612903
  
  > prefit(x, "geom", "qme", list(prob=1/2), probs=1/2, lower=-Inf, upper=Inf)
  $prob
  [1] 0.3100255
  
  > 
  > 
  > # (3) Pareto
  > 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
  
  > x  <-  rpareto(nsample, 6, 2)
  > 
  > prefit(x, "pareto", "mme", list(shape=10, scale=10), order=1:2, memp=function(x, order) mean(x^order), lower=-Inf, upper=Inf)
  Error in prefit(x, "pareto", "mme", list(shape = 10, scale = 10), order = 1:2,  : 
    unsuccessful pre-fitting process
  Execution halted