Running examples in ‘RLRsim-Ex.R’ failed
The error most likely occurred in:

> ### Name: exactRLRT
> ### Title: Restricted Likelihood Ratio Tests for additive and linear mixed
> ###   models
> ### Aliases: exactRLRT
> ### Keywords: htest
> 
> ### ** Examples
> 
> 
> data(sleepstudy, package = "lme4")
> mA <- lme4::lmer(Reaction ~ I(Days-4.5) + (1|Subject) + (0 + I(Days-4.5)|Subject), 
+   data = sleepstudy)
Warning in optwrap(optimizer, devfun, getStart(start, rho$pp), lower = rho$lower,  :
  convergence code -2 from nloptwrap: NLOPT_INVALID_ARGS: Invalid arguments (e.g. lower bounds are bigger than upper bounds, an unknown algorithm was specified, etcetera).
Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
  unable to evaluate scaled gradient
Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
  Model failed to converge: degenerate  Hessian with 1 negative eigenvalues
> m0 <- update(mA, . ~ . - (0 + I(Days-4.5)|Subject))
Warning in optwrap(optimizer, devfun, getStart(start, rho$pp), lower = rho$lower,  :
  convergence code -2 from nloptwrap: NLOPT_INVALID_ARGS: Invalid arguments (e.g. lower bounds are bigger than upper bounds, an unknown algorithm was specified, etcetera).
Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
  Model failed to converge with max|grad| = 1.97927 (tol = 0.002, component 1)
> m.slope  <- update(mA, . ~ . - (1|Subject))
Warning in optwrap(optimizer, devfun, getStart(start, rho$pp), lower = rho$lower,  :
  convergence code -2 from nloptwrap: NLOPT_INVALID_ARGS: Invalid arguments (e.g. lower bounds are bigger than upper bounds, an unknown algorithm was specified, etcetera).
Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
  unable to evaluate scaled gradient
Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
  Model failed to converge: degenerate  Hessian with 1 negative eigenvalues
> #test for subject specific slopes:
> exactRLRT(m.slope, mA, m0)
Error in if (rlrt.obs != 0) { : missing value where TRUE/FALSE needed
Calls: exactRLRT
Execution halted