Skip to content

Error in calling glmer from mixed() #134

@tkerwin

Description

@tkerwin

Following the example in the binomial GLMM vignette:

e1_mixed1_v2 <- mixed(
   acc ~ congruency*condition + (congruency*condition|pno), 
   data = stroop_e1_agg, 
   method = "PB", 
   family = binomial,
   weight = n
)

I get the error:

Error in `glmer()`:
! unused argument (REML = FALSE)
  1. └─afex::mixed(...)
  2.   ├─base::do.call(...) at afex/R/mixed.R:1011:11
  3.   ├─pbkrtest (local) `<fn>`(largeModel = `<glmerMod>`, smallModel = `<glmerMod>`)
  4.   └─pbkrtest:::PBmodcomp.merMod(largeModel = `<glmerMod>`, smallModel = `<glmerMod>`)
  5.     ├─pbkrtest::PBrefdist(...)
  6.     └─pbkrtest:::PBrefdist.merMod(...)
  7.       └─pbkrtest:::do_sampling(largeModel, smallModel, nsim, cl, details)
  8.         ├─base::unlist(...)
  9.         └─parallel::mclapply(...)
 10.           └─base::lapply(X, FUN, ...)
 11.             └─pbkrtest (local) FUN(X[[i]], ...)
 12.               └─pbkrtest (local) get_fun(largeModel, smallModel, nsim = nsim.cl)
 13.                 ├─base::unname(...)
 14.                 ├─base::unlist(...)
 15.                 └─base::lapply(...)
 16.                   └─pbkrtest (local) FUN(X[[i]], ...)
 17.                     ├─base::suppressMessages(refit_safe(sm, yyy, ctrl))
 18.                     │ └─base::withCallingHandlers(...)
 19.                     └─pbkrtest (local) refit_safe(sm, yyy, ctrl)

I saw the same error in my own usage of mixed with a Poisson family glmm, which led me to investigate further.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions