Hi everyone,
I am relatively new in MEMs, and trying to tigure out what is the best
model fo my data. The data itself is relatively simple but the design more
complicated..
To make it simpler, I am interested in investigating if there is a
difference between two measures made at two point in time (1 and 2), that
is all. My dependent variable is a grade. I do not enter into details in
order to keep it as simple as possible. My theory predicts that the grades
will be smaller at time 2 compared to time 1.
Basically I have 30 subjects, and 100 Items and I want to make sure that
there is an effect after controlling for subjects and items. Here is the
design.
Before the experiment I randomly selected 30 subjects from a pool. I also
randomly selected 100 items from a pool. Next, I randomly divided the 30
subjects into 5 groups of 6 subjects. I also randomly divided the 100
items into 5 groups of 20 items. The groups do not have any theoretical
relations and all was divided totally randomly.
Then I assigned one group of 20 items to one group of 6 subjects. Within
each group, each 6 subjects saw each 20 items. For each Items, each subject
gave me one grade at Time 1, and one at Time 2.
My question is how to model this design. One possibility I have tried
if to ignore the group and took into account only the subjects and the
items.
This is my syntax:
model1 <- lmer(Grade ~ 1 + Time +
(1 + Time | Subject) +
(1 + Time | Item),
REML=F, data = NITE1)
Does anyone have an idea how to take the "group" into account?
Alternaltvely, do you think the model I built is sufficient?
Thank you in advance
Meir
(no subject)
2 messages · Meir Barneron, Dan McCloy
4 days later
The GLMM FAQ has some information about specifying nested random effects. See especially the "model specification" table [1] and the "nested or crossed" section [2]. Something like this may be what you're looking for: grade ~ Time + (Time | SubjectGroup / Subject) + (Time | ItemGroup / Item) Given that you've assigned groups randomly, I'm unsure if there will be much benefit to modeling the groups this way (unless maybe "grade" for one subject/item is somehow influenced by the other subjects or items in the group?). Anyway, the dataset is small enough that it will be easy to try and see what happens. Also note that if "Time" has only two values, it can be treated as a factor (like "pre" and "post" treatment). [1]: https://rawgit.com/bbolker/mixedmodels-misc/master/glmmFAQ.html#model-specification [2]: https://rawgit.com/bbolker/mixedmodels-misc/master/glmmFAQ.html#nested-or-crossed -- dan Daniel McCloy http://dan.mccloy.info/ Postdoctoral Research Associate Institute for Learning and Brain Sciences University of Washington On Thu, Aug 4, 2016 at 2:22 AM, Meir Barneron <meir.barneron at gmail.com> wrote:
Hi everyone,
I am relatively new in MEMs, and trying to tigure out what is the best
model fo my data. The data itself is relatively simple but the design more
complicated..
To make it simpler, I am interested in investigating if there is a
difference between two measures made at two point in time (1 and 2), that
is all. My dependent variable is a grade. I do not enter into details in
order to keep it as simple as possible. My theory predicts that the grades
will be smaller at time 2 compared to time 1.
Basically I have 30 subjects, and 100 Items and I want to make sure that
there is an effect after controlling for subjects and items. Here is the
design.
Before the experiment I randomly selected 30 subjects from a pool. I also
randomly selected 100 items from a pool. Next, I randomly divided the 30
subjects into 5 groups of 6 subjects. I also randomly divided the 100
items into 5 groups of 20 items. The groups do not have any theoretical
relations and all was divided totally randomly.
Then I assigned one group of 20 items to one group of 6 subjects. Within
each group, each 6 subjects saw each 20 items. For each Items, each subject
gave me one grade at Time 1, and one at Time 2.
My question is how to model this design. One possibility I have tried
if to ignore the group and took into account only the subjects and the
items.
This is my syntax:
model1 <- lmer(Grade ~ 1 + Time +
(1 + Time | Subject) +
(1 + Time | Item),
REML=F, data = NITE1)
Does anyone have an idea how to take the "group" into account?
Alternaltvely, do you think the model I built is sufficient?
Thank you in advance
Meir
[[alternative HTML version deleted]]
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models