# Mixed effect modelling with multiple, nested random variable

Goal: comparing pitch (Hz) on three types of words

Dependent variable: Hz

Fixed predictor variable: word-type, points (measurements taken from five points on each token, to capture Hz change within a token), gender (females have higher Hz)

Random variable: repetitions, which are nested within items, which are nested within speakers. Each of 15 speaker produces 5 repetitions of 5 items of the same word-type.

My question is, how do I capture the nested nature of my three random variables, with mixed effect model using R? Naively I've tried (repetition|item|speaker), which obviously doesn't seem to work.

My full model, run with lme4 package, should like this:

lmer(hz ~ word_type + point + gender + (????), data=dataX)


The problem is that I am not sure I how should write my random variables (repetitions, items, and speakers).

• What is your question? You ask if this kind of model is possible or about using a specific software to compute it..? – Tim Jan 28 '15 at 12:45
• Hi Tim, I have updated my question. Hope it is clearer. I am sorry for my confusing original post.. – Yang Jan 28 '15 at 12:52

word_type + point + gender + (1|speaker/item/repetition)
This translates to: repetition nested in item, nested in speaker.