dat <- plosives
dat$spont[dat$dialect == "Valladolid"] <- NA
sobj <- standardize(intdiff ~ voicing * dialect * spont +
(1 + voicing * spont | speaker) + (1 + dialect | item), dat)
mod <- nauf_lmer(sobj$formula, sobj$data)
fit <- predict(mod) # fitted values
preds <- predict(mod, sobj$data) # predict same data using all ranef
preds_fe <- predict(mod, sobj$data, re.form = NA) # only use fixef
isTRUE(all.equal(fit, preds)) # TRUE
isTRUE(all.equal(preds, preds_fe)) # FALSE
Run the code above in your browser using DataLab