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

> ### Name: buildmer
> ### Title: Use 'buildmer' to fit mixed-effects models using 'lmer'/'glmer'
> ###   from 'lme4'
> ### Aliases: buildmer
> 
> ### ** Examples
> 
> library(buildmer)
> model <- buildmer(Reaction ~ Days + (Days|Subject),lme4::sleepstudy)
Determining predictor order
Fitting via lm: Reaction ~ 1
Currently evaluating LRT for: Days
Fitting via lm: Reaction ~ 1 + Days
Updating formula: Reaction ~ 1 + Days
Fitting via gam, with REML: Reaction ~ 1 + Days
Currently evaluating LRT for: 1 | Subject
Fitting via lmer, with REML: Reaction ~ 1 + Days + (1 | Subject)
Ending the ordering procedure due to having reached the maximal
    feasible model - all higher models failed to converge. The types of
    convergence failure are: Optimizer reports not having finished (-2)
Fitting ML reference model
Fitting via lm: Reaction ~ 1 + Days
Testing terms
Fitting via lm: Reaction ~ 1
  grouping term      block   score Iteration          LRT
1     <NA>    1    NA NA 1      NA         1           NA
2     <NA> Days NA NA Days -32.673         1 6.460934e-15
All terms are significant
> 
> # Tests from github issue #2, that also show the use of the 'direction' and 'crit' parameters:
> bm.test <- buildmer(cbind(incidence,size - incidence) ~ period + (1 | herd),
+ 	family=binomial,data=lme4::cbpp)
Determining predictor order
Fitting via glm: cbind(incidence, size - incidence) ~ 1
Currently evaluating LRT for: period
Fitting via glm: cbind(incidence, size - incidence) ~ 1 + period
Updating formula: cbind(incidence, size - incidence) ~ 1 + period
Fitting via glm: cbind(incidence, size - incidence) ~ 1 + period
Currently evaluating LRT for: 1 | herd
Fitting via glmer, with ML: cbind(incidence, size - incidence) ~ 1 +
    period + (1 | herd)
Updating formula: cbind(incidence, size - incidence) ~ 1 + period + (1
    | herd)
Fitting ML and REML reference models
Fitting via glmer, with ML: cbind(incidence, size - incidence) ~ 1 +
    period + (1 | herd)
Fitting via glmer, with ML: cbind(incidence, size - incidence) ~ 1 +
    period + (1 | herd)
Testing terms
Fitting via glmer, with ML: cbind(incidence, size - incidence) ~ 1 + (1
    | herd)
Fitting via glm: cbind(incidence, size - incidence) ~ 1 + period
  grouping   term        block      score Iteration          LRT
1     <NA>      1      NA NA 1         NA         1           NA
2     <NA> period NA NA period -18.706656         1 1.151006e-05
3     herd      1    NA herd 1  -9.303008         1 9.114967e-05
All terms are significant
> bm.test <- buildmer(cbind(incidence,size - incidence) ~ period + (1 | herd),
+ 	family=binomial,data=lme4::cbpp,buildmerControl=buildmerControl(direction='forward'))
Determining predictor order
Fitting via glm: cbind(incidence, size - incidence) ~ 1
Currently evaluating LRT for: period
Fitting via glm: cbind(incidence, size - incidence) ~ 1 + period
Updating formula: cbind(incidence, size - incidence) ~ 1 + period
Fitting via glm: cbind(incidence, size - incidence) ~ 1 + period
Currently evaluating LRT for: 1 | herd
Fitting via glmer, with ML: cbind(incidence, size - incidence) ~ 1 +
    period + (1 | herd)
Updating formula: cbind(incidence, size - incidence) ~ 1 + period + (1
    | herd)
  grouping   term        block        score
1     <NA>      1      NA NA 1           NA
2     <NA> period NA NA period 7.512809e-09
3     herd      1    NA herd 1 9.114967e-05
Fitting via glmer, with ML: cbind(incidence, size - incidence) ~ 1 +
    period + (1 | herd)
> bm.test <- buildmer(cbind(incidence,size - incidence) ~ period + (1 | herd),
+ 	family=binomial,data=lme4::cbpp,buildmerControl=buildmerControl(crit='AIC'))
Determining predictor order
Fitting via glm: cbind(incidence, size - incidence) ~ 1
Currently evaluating AIC for: period
Fitting via glm: cbind(incidence, size - incidence) ~ 1 + period
Updating formula: cbind(incidence, size - incidence) ~ 1 + period
Fitting via glm: cbind(incidence, size - incidence) ~ 1 + period
Currently evaluating AIC for: 1 | herd
Fitting via glmer, with ML: cbind(incidence, size - incidence) ~ 1 +
    period + (1 | herd)
Updating formula: cbind(incidence, size - incidence) ~ 1 + period + (1
    | herd)
Fitting ML and REML reference models
Fitting via glmer, with ML: cbind(incidence, size - incidence) ~ 1 +
    period + (1 | herd)
Fitting via glmer, with ML: cbind(incidence, size - incidence) ~ 1 +
    period + (1 | herd)
Testing terms
Fitting via glmer, with ML: cbind(incidence, size - incidence) ~ 1 + (1
    | herd)
Fitting via glm: cbind(incidence, size - incidence) ~ 1 + period
  grouping   term        block     score Iteration       AIC
1     <NA>      1      NA NA 1        NA         1        NA
2     <NA> period NA NA period -34.71577         1 -19.60994
3     herd      1    NA herd 1 -12.00527         1 -12.00527
All terms are significant
> bm.test <- buildmer(cbind(incidence,size - incidence) ~ period + (1 | herd),
+ 	family=binomial,data=lme4::cbpp,
+ 	buildmerControl=buildmerControl(direction='forward',crit='AIC'))
Determining predictor order
Fitting via glm: cbind(incidence, size - incidence) ~ 1
Currently evaluating AIC for: period
Fitting via glm: cbind(incidence, size - incidence) ~ 1 + period
Updating formula: cbind(incidence, size - incidence) ~ 1 + period
Fitting via glm: cbind(incidence, size - incidence) ~ 1 + period
Currently evaluating AIC for: 1 | herd
Fitting via glmer, with ML: cbind(incidence, size - incidence) ~ 1 +
    period + (1 | herd)
Updating formula: cbind(incidence, size - incidence) ~ 1 + period + (1
    | herd)
  grouping   term        block     score
1     <NA>      1      NA NA 1        NA
2     <NA> period NA NA period -34.71577
3     herd      1    NA herd 1 -12.00527
Fitting via glmer, with ML: cbind(incidence, size - incidence) ~ 1 +
    period + (1 | herd)
> 
> # Example showing use of the 'include' parameter to force a particular term into the model
> m1 <- buildmer(Reaction ~ Days,data=lme4::sleepstudy,buildmerControl=list(include=~(1|Subject)))
Determining predictor order
Fitting via lmer, with ML: Reaction ~ 1 + (1 | Subject)
Convergence failure. Reducing terms and retrying... The failure was:
    Optimizer reports not having finished (-2)
Error in reduce.model(p, conv) : No terms left for reduction, giving up
Calls: buildmer ... buildmer.fit -> do.call -> order -> reorder -> reduce.model
Execution halted