Dear all,I try to find the appropriate model for the following data set with lme4:
Each individual subject goes through 3 conditions ("Group", within-subject factor). These 3 conditions include 9 items (3 items in each condition, but the items differ in each condition). Score (4th column not represented above) is a continuous dependant variable (reaction time).I am interested in the fixed effect of the "Cond" variable and also would like to take into account the dependencies between my factors, but I have difficulties to know if my factors should be considered as nested or crossed.Does the following model seems correct to you ?Score~1+Cond+(1|Subject)+(1|item).Any help would be much appreciated.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1530169904311blob.jpg
Type: image/png
Size: 13883 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20180628/f4eb6e27/attachment.png>
r crossed nested random effects lme4
4 messages · Alday, Phillip, audusseau jean, Phillip Alday
lme4 doesn't force a hard nested-crossed distinction and can handle implicit nesting/crossing easily (assuming unique identifiers, which you have), so you don't have to worry about that. The only "problem" I see with your model is that it is an "intercept-only" model. Given that there are only three items per condition, this makes sense for the by-item random effect. But you should consider whether the by-subject random effect should have a slope for condition. This is all assuming that you only sent us a screenshot of the top of the dataset and that you have more than three subjects ... There are some more general issues about whether you should transform reaction time, but a quick search will yield lots of papers discussing the pros and cons of that. Finally, please be kind to the list and be consistent in your names -- you swap back and forth between Group and Cond in your description. Phillip
On 28/06/18 09:13, audusseau jean via R-sig-mixed-models wrote:
Dear all,I try to find the appropriate model for the following data set with lme4:
Each individual subject goes through 3 conditions ("Group", within-subject factor). These 3 conditions include 9 items (3 items in each condition, but the items differ in each condition). Score (4th column not represented above) is a continuous dependant variable (reaction time).I am interested in the fixed effect of the "Cond" variable and also would like to take into account the dependencies between my factors, but I have difficulties to know if my factors should be considered as nested or crossed.Does the following model seems correct to you ?Score~1+Cond+(1|Subject)+(1|item).Any help would be much appreciated.
_______________________________________________
R-sig-mixed-models at r-project.org<mailto:R-sig-mixed-models at r-project.org> mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
Phillip,
Many thanks for your answer. I apologize for such an unclear description ofmy experiment. I wanted to make it simpler but it seems I produced theopposite.
In fact, my experiment consists of :
- 71 subjects
- going through 3 conditions (so "condition" and"subject" are crossed)
- each condition comprises 30 items (so items are nested inconditions)
Concerning the dependant variable, I use 1/RT.
As I understand your comments, I should acknowledge that the condition effectmay vary for different subjects. So I thought a better model may be:
1/RT~1+condition+(condition|subject)+(1| item)
Given that I have 30 items in each condition, would you advice to modifythe last term of this syntax??
Thank you for your time.
Le jeudi 28 juin 2018 ? 21:59:56 UTC+2, Alday, Phillip <Phillip.Alday at mpi.nl> a ?crit :
lme4 doesn't force a hard nested-crossed distinction and can handle implicit nesting/crossing easily (assuming unique identifiers, which you have), so you don't have to worry about that.
The only "problem" I see with your model is that it is an "intercept-only" model. Given that there are only three items per condition, this makes sense for the by-item random effect. But you should consider whether the by-subject random effect should have a slope for condition. This is all assuming that you only sent us a screenshot of the top of the dataset and that you have more than three subjects ...
There are some more general issues about whether you should transform reaction time, but a quick search will yield lots of papers discussing the pros and cons of that.
Finally, please be kind to the list and be consistent in your names -- you swap back and forth between Group and Cond in your description.
Phillip
On 28/06/18 09:13, audusseau jean via R-sig-mixed-models wrote:
Dear all,I try to find the appropriate model for the following data set with lme4:
Each individual subject goes through 3 conditions ("Group", within-subject factor). These 3 conditions include 9 items (3 items in each condition, but the items differ in each condition). Score (4th column not represented above) is a continuous dependant variable (reaction time).I am interested in the fixed effect of the "Cond" variable and also would like to take into account the dependencies between my factors, but I have difficulties to know if my factors should be considered as nested or crossed.Does the following model seems correct to you ?Score~1+Cond+(1|Subject)+(1|item).Any help would be much appreciated.
_______________________________________________
R-sig-mixed-models at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
Yes, use that model. Since Items are nested within conditions, it doesn't make sense to have an by-item slope for condition. Phillip
On 06/29/2018 10:25 AM, audusseau jean wrote:
Phillip, Many thanks for your answer. I apologize for such an unclear description of my experiment. I wanted to make it simpler but it seems I produced the opposite. In fact, my experiment consists of : - _71_ subjects - going through 3 conditions (so "condition" and "subject" are crossed) - each condition comprises _30_ items (so items are nested in conditions) Concerning the dependant variable, I use 1/RT. As I understand your comments, I should acknowledge that the condition effect may vary for different subjects. So I thought a better model may be: 1/RT~1+condition+(condition|subject) +(1| item) Given that I have 30 items in each condition, would you advice to modify the last term of this syntax ? Thank you for your time. Le jeudi 28 juin 2018 ? 21:59:56 UTC+2, Alday, Phillip <Phillip.Alday at mpi.nl> a ?crit : lme4 doesn't force a hard nested-crossed distinction and can handle implicit nesting/crossing easily (assuming unique identifiers, which you have), so you don't have to worry about that. The only "problem" I see with your model is that it is an "intercept-only" model. Given that there are only three items per condition, this makes sense for the by-item random effect. But you should consider whether the by-subject random effect should have a slope for condition. This is all assuming that you only sent us a screenshot of the top of the dataset and that you have more than three subjects ... There are some more general issues about whether you should transform reaction time, but a quick search will yield lots of papers discussing the pros and cons of that. Finally, please be kind to the list and be consistent in your names -- you swap back and forth between Group and Cond in your description. Phillip On 28/06/18 09:13, audusseau jean via R-sig-mixed-models wrote:
Dear all,I try to find the appropriate model for the following data set with lme4:
Each individual subject goes through 3 conditions ("Group", within-subject factor). These 3 conditions include 9 items (3 items in each condition, but the items differ in each condition). Score (4th column not represented above) is a continuous dependant variable (reaction time).I am interested in the fixed effect of the "Cond" variable and also would like to take into account the dependencies between my factors, but I have difficulties to know if my factors should be considered as nested or crossed.Does the following model seems correct to you ?Score~1+Cond+(1|Subject)+(1|item).Any help would be much appreciated.
_______________________________________________ R-sig-mixed-models at r-project.org <mailto:R-sig-mixed-models at r-project.org> mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models