Running ‘BIC.R’
  Comparing ‘BIC.Rout’ to ‘BIC.Rout.save’ ... OK
  Running ‘ICtab.R’
  Comparing ‘ICtab.Rout’ to ‘ICtab.Rout.save’ ... OK
  Running ‘RUnit-tests.R’
  Running ‘binomtest1.R’
  Comparing ‘binomtest1.Rout’ to ‘binomtest1.Rout.save’ ...
12,14d11
< Warning message:
< In structure(list(Initial = as.integer(c(5, 5, 10, 10, 15, 15, 20,  :
<   Replacing special names '.Names' is deprecated; use 'names' instead.
  Running ‘boundstest.R’
  Running ‘controleval.R’
  Comparing ‘controleval.Rout’ to ‘controleval.Rout.save’ ... OK
  Running ‘eval.R’
  Comparing ‘eval.Rout’ to ‘eval.Rout.save’ ... OK
  Running ‘formulatest.R’
  Comparing ‘formulatest.Rout’ to ‘formulatest.Rout.save’ ...
29,31d28
< Warning message:
< In structure(list(TBL = as.integer(c(9, 9, 9, 12, 12, 12, 21, 21,  :
<   Replacing special names '.Names' is deprecated; use 'names' instead.
335,341d331
< Warning messages:
< 1: In structure(as.integer(c(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  :
<   Replacing special names '.Label' is deprecated; use 'levels' instead.
< 2: In structure(as.integer(c(15, 15, 15, 15, 15, 15, 15, 15, 15, 15,  :
<   Replacing special names '.Label' is deprecated; use 'levels' instead.
< 3: In structure(list(exper = as.integer(c(1, 1, 1, 1, 1, 1, 1, 1, 1,  :
<   Replacing special names '.Names' is deprecated; use 'names' instead.
  Running ‘glmcomp.R’
  Comparing ‘glmcomp.Rout’ to ‘glmcomp.Rout.save’ ... OK
  Running ‘gradient_vecpar_profile.R’ [11s/12s]
  Comparing ‘gradient_vecpar_profile.Rout’ to ‘gradient_vecpar_profile.Rout.save’ ... OK
  Running ‘grtest1.R’
  Comparing ‘grtest1.Rout’ to ‘grtest1.Rout.save’ ... OK
  Running ‘impsamp.R’
  Running ‘methods.R’
  Comparing ‘methods.Rout’ to ‘methods.Rout.save’ ... OK
  Running ‘mortanal.R’
  Comparing ‘mortanal.Rout’ to ‘mortanal.Rout.save’ ...
48,54d47
< Warning messages:
< 1: In structure(as.integer(c(20, 77, 79, 21, 33, 40, 11, 28, 43, 85,  :
<   Replacing special names '.Label' is deprecated; use 'levels' instead.
< 2: In structure(as.integer(c(5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,  :
<   Replacing special names '.Label' is deprecated; use 'levels' instead.
< 3: In structure(list(indiv = structure(as.integer(c(20, 77, 79, 21,  :
<   Replacing special names '.Names' is deprecated; use 'names' instead.
  Running ‘optimize.R’
  Comparing ‘optimize.Rout’ to ‘optimize.Rout.save’ ... OK
  Running ‘optimizers.R’
  Comparing ‘optimizers.Rout’ to ‘optimizers.Rout.save’ ... OK
  Running ‘optimx.R’
  Comparing ‘optimx.Rout’ to ‘optimx.Rout.save’ ... OK
  Running ‘order.R’
  Comparing ‘order.Rout’ to ‘order.Rout.save’ ... OK
  Running ‘parscale.R’
  Running ‘predict.R’
  Comparing ‘predict.Rout’ to ‘predict.Rout.save’ ... OK
  Running ‘prof_newmin.R’
  Running ‘prof_spec.R’
  Running ‘profbound.R’
  Comparing ‘profbound.Rout’ to ‘profbound.Rout.save’ ... OK
  Running ‘richards.R’ [9s/11s]
  Comparing ‘richards.Rout’ to ‘richards.Rout.save’ ... OK
  Running ‘startvals.R’
  Comparing ‘startvals.Rout’ to ‘startvals.Rout.save’ ... OK
  Running ‘startvals2.R’
  Comparing ‘startvals2.Rout’ to ‘startvals2.Rout.save’ ...
165,171d164
< Warning messages:
< 1: In structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,  :
<   Replacing special names '.Label' is deprecated; use 'levels' instead.
< 2: In structure(c(34L, 57L, 77L, 114L, 115L, 116L, 117L, 125L, 141L,  :
<   Replacing special names '.Names' is deprecated; use 'names' instead.
< 3: In structure(list(TOTCONES = c(19, 42, 40, 68, 5, 0, 21, 114, 37,  :
<   Replacing special names '.Names' is deprecated; use 'names' instead.
  Running ‘test-relist1.R’
  Comparing ‘test-relist1.Rout’ to ‘test-relist1.Rout.save’ ... OK
  Running ‘testbounds.R’
  Comparing ‘testbounds.Rout’ to ‘testbounds.Rout.save’ ... OK
  Running ‘testderiv.R’
  Comparing ‘testderiv.Rout’ to ‘testderiv.Rout.save’ ... OK
  Running ‘testenv.R’
  Comparing ‘testenv.Rout’ to ‘testenv.Rout.save’ ... OK
  Running ‘testparpred.R’
  Comparing ‘testparpred.Rout’ to ‘testparpred.Rout.save’ ... OK
  Running ‘tmptest.R’
  Comparing ‘tmptest.Rout’ to ‘tmptest.Rout.save’ ... OK
  Running ‘update.R’
  Comparing ‘update.Rout’ to ‘update.Rout.save’ ... OK
Running the tests in ‘tests/parscale.R’ failed.
Complete output:
  > library(bbmle)
  Loading required package: stats4
  > old_opt <- options(digits=3)
  > tracelevel <- 0
  > 
  > ## source("~/lib/R/pkgs/bbmle/pkg/R/mle.R
  > 
  > set.seed(1002)
  > X <- rexp(1000, rate = 0.0001)
  > f <- function(X, rate) {
  +   if (tracelevel>0 && rate<0) cat("rate<0: ",rate,"\n")
  +   -sum(dexp(X, rate = rate, log = TRUE))
  + }
  > if (FALSE) {
  +   ## L-BFGS-B violates bounds, and gets stuck at lower bound
  +   m <- mle2(minuslogl = f,
  +             data = list(X = X),
  +             start = list(rate = 0.01),
  +             method = "L-BFGS-B",
  +             control = list(trace = tracelevel, 
  +                            parscale = 1e-4),
  +             lower = c(rate = 1e-9))
  + 
  +   profile(m, std.err=0.0001) ## finds new optimum
  + 
  +   fsc <- function(X, rate) {
  +     -sum(dexp(X, rate = rate*1e-4, log = TRUE))
  +   }
  +   msc <- mle2(minuslogl = fsc,
  +             data = list(X = X),
  +             start = list(rate = 100),
  +             method = "L-BFGS-B",
  +             control = list(trace = tracelevel),
  +             lower = c(rate = 1e-5))
  + 
  +   ## does it work if we scale by hand?
  +   ##   no, identical problem
  + }
  > 
  > ## works fine with a better starting point
  > m <- mle2(minuslogl = f,
  +           data = list(X = X),
  +           start = list(rate = 0.001),
  +           method = "L-BFGS-B",
  +           control = list(trace = tracelevel,
  +                          parscale=1e-4),
  +               lower = c(rate = 1e-9))
  > vcov(m)
           rate
  rate 1.05e-11
  > confint(m)
     2.5 %   97.5 % 
  9.61e-05 1.09e-04 
  > 
  > 
  > ## works OK despite warnings about 1-dimensional opt. with N-M
  > (m0 <- mle2(minuslogl = f,
  +           data = list(X = X),
  +           start = list(rate = 0.01),
  +           method = "Nelder-Mead",
  +           control = list(trace = tracelevel, parscale = 1e-4)))
  
  Call:
  mle2(minuslogl = f, start = list(rate = 0.01), method = "Nelder-Mead", 
      data = list(X = X), control = list(trace = tracelevel, parscale = 1e-04))
  
  Coefficients:
      rate 
  0.000102 
  
  Log-likelihood: -10188 
  Warning message:
  In optim(par = c(rate = 0.01), fn = function (p)  :*** buffer overflow detected ***: terminated