dat <- plosives
dat$spont[dat$dialect == "Valladolid"] <- NA
form <- intdiff ~ voicing * dialect * spont +
(1 + voicing * spont | speaker) + (1 + dialect | item)
sobj <- standardize(form, dat)
mf <- nauf_model.frame(sobj$formula, sobj$data)
## the following all result in the same model matrix
mm1 <- nauf_model.matrix(mf)
mm2 <- nauf_model.matrix(form, mf) # 'form' ignored
mm3 <- nauf_model.matrix(sobj$formula, sobj$data)
Run the code above in your browser using DataLab