How to fit two random effects separately in lme?

不想你离开。 提交于 2019-12-03 07:10:23
Fien

I think it is possible to include two random effects seperately (one for speaker and one for time) using lme() by the following code:

x4 <- lme (DV ~ IV1 + IV2 + IV1*IV2, data=a.frame, random=~ speaker + item -1 | id),

with id a higher level variable in which both speaker and item are nested. If you don't have such a variable, you could introduce it as a new variable with value 1 for all observations.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!