Hello all, I have data from a repeated measures, crossover experiment that goes a bit beyond my experience. I wanted to be sure I was approaching the data in the right way. The sample size is small as this is an independent study project with an undergraduate student, but we see some interesting patterns and I hope it holds up to a proper analysis. Pardon the length of the explanation: I want to be clear about what the problems are. I'm trying to test whether snakes respond differently to certain odor cues. We have 5 individual snakes. The first week, each snake was tested in 3 sets of tests, with each set of tests on a different day. In each set, they were exposed to all 4 cues in a randomized order (C B A D on day 1, then A B D C on day 2, etc.) Don't worry about order effects - that's not where I'm going with this. I expect the same snakes' behavior to be correlated both across days (some snakes exhibit stronger responses reliably), and I expect their behavior in response to the 4 different cues to be correlated within days (e.g., if they happen to be warmer on Monday, they might have a stronger response to all 4 cues). I don't necessarily expect this day-to-day variation to be correlated among individuals (I doubt Monday would be a high response day for all snakes). What I care about are the within-subjects, within-date differences between the cues (do they reliably respond more strongly to cue A than the other cues tested on the same day?) ***My first question is what would be the proper formatting for a repeated measures analysis of this in lmer**.* I was torn between a few different options: Behavior ~ Cue + (1|Subject) + (1|Date) <--- Seems to assume that date effects are similar for all individuals Behavior ~ Cue + (1|Subject/Date) Behavior ~ Cue + (1|Subject:Date) Any advice on which of these are more appropriate for the structure of my data? The second issue is that I retested these same snakes in a second battery of tests. The structure is identical, except instead of the first 4 cues (A B C D), two cues were switched out for new ones (A B E F). I could perform a separate analysis of the data from this battery of tests, using the best format from the above data. However, since it is the same individual animals, and since the A vs. B contrast is present in both batteries of tests, it would be nice to put all the data into a single analysis. This would strengthen the A vs. B comparisons and seems more elegant than two separate analyses. ***Are there any reasons I couldn't do this?*** The only thing I could think of would be that some pairwise comparisons would have never actually been performed on the same day (e.g., C was part of the first battery of tests, and E was part of the second), but accounting for date effects should control for this, I think. Finally, I was considering bootstrap analysis to generate CIs for testing null hypotheses, as my data are hard to normalize with transformations. ***Would that eliminate the ability to do pairwise, post-hoc comparisons (using lsmeans or multcomp)?*** I'd like to know which cues are different from which. I could do this by re-running the analysis with each cue type as the reference level - then the effects reported would be pairwise with respect to the reference cue, but this doesn't account for multiple comparisons. Thank you so much in advance for taking the time to wade through this and offer me any thoughts. I'd also be happy to send the data and have someone put together a script that seems reasonable to them, so I can learn the nuances of LMM a little better. Best, Brad Assistant Professor of Biology Wabash College Crawfordsville, IN
Choosing best approach for a crossover experiment
2 messages · Bradley Carlson, Thierry Onkelinx
6 days later
Dear Bradley, For your first question you could consider the combination of crossed and interaction random effects. (1|Subject) + (1|Date) + (1|Subject:Date) That might be overkill given that you have only 4 observations for each level of Subject:Date. Therefore I'd rather go for (1|Subject) + (1|Date). For the second one: though not the most efficient design to test 6 treatment, it seems reasonable to me to analyse them with a single model. For the last question: What is hard to normalise? The response or the residuals? Note that only the residuals are assumed to be normal. Best regards, ir. Thierry Onkelinx Statisticus / Statistician Vlaamse Overheid / Government of Flanders INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND FOREST Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance thierry.onkelinx at inbo.be Kliniekstraat 25, B-1070 Brussel www.inbo.be /////////////////////////////////////////////////////////////////////////////////////////// To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of. ~ Sir Ronald Aylmer Fisher The plural of anecdote is not data. ~ Roger Brinner The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data. ~ John Tukey /////////////////////////////////////////////////////////////////////////////////////////// Van 14 tot en met 19 december 2017 verhuizen we uit onze vestiging in Brussel naar het Herman Teirlinckgebouw op de site Thurn & Taxis. Vanaf dan ben je welkom op het nieuwe adres: Havenlaan 88 bus 73, 1000 Brussel. /////////////////////////////////////////////////////////////////////////////////////////// 2017-12-05 17:50 GMT+01:00 Bradley Carlson <carbrae at gmail.com>:
Hello all,
I have data from a repeated measures, crossover experiment that goes a bit
beyond my experience. I wanted to be sure I was approaching the data in the
right way. The sample size is small as this is an independent study project
with an undergraduate student, but we see some interesting patterns and I
hope it holds up to a proper analysis. Pardon the length of the
explanation: I want to be clear about what the problems are.
I'm trying to test whether snakes respond differently to certain odor cues.
We have 5 individual snakes. The first week, each snake was tested in 3
sets of tests, with each set of tests on a different day. In each set, they
were exposed to all 4 cues in a randomized order (C B A D on day 1, then A
B D C on day 2, etc.) Don't worry about order effects - that's not where
I'm going with this. I expect the same snakes' behavior to be correlated
both across days (some snakes exhibit stronger responses reliably), and I
expect their behavior in response to the 4 different cues to be correlated
within days (e.g., if they happen to be warmer on Monday, they might have a
stronger response to all 4 cues). I don't necessarily expect this
day-to-day variation to be correlated among individuals (I doubt Monday
would be a high response day for all snakes). What I care about are the
within-subjects, within-date differences between the cues (do they reliably
respond more strongly to cue A than the other cues tested on the same day?)
***My first question is what would be the proper formatting for a repeated
measures analysis of this in lmer**.* I was torn between a few different
options:
Behavior ~ Cue + (1|Subject) + (1|Date) <--- Seems to assume that date
effects are similar for all individuals
Behavior ~ Cue + (1|Subject/Date)
Behavior ~ Cue + (1|Subject:Date)
Any advice on which of these are more appropriate for the structure of my
data?
The second issue is that I retested these same snakes in a second battery
of tests. The structure is identical, except instead of the first 4 cues (A
B C D), two cues were switched out for new ones (A B E F). I could perform
a separate analysis of the data from this battery of tests, using the best
format from the above data. However, since it is the same individual
animals, and since the A vs. B contrast is present in both batteries of
tests, it would be nice to put all the data into a single analysis. This
would strengthen the A vs. B comparisons and seems more elegant than two
separate analyses. ***Are there any reasons I couldn't do this?*** The only
thing I could think of would be that some pairwise comparisons would have
never actually been performed on the same day (e.g., C was part of the
first battery of tests, and E was part of the second), but accounting for
date effects should control for this, I think.
Finally, I was considering bootstrap analysis to generate CIs for testing
null hypotheses, as my data are hard to normalize with
transformations. ***Would
that eliminate the ability to do pairwise, post-hoc comparisons
(using lsmeans or multcomp)?*** I'd like to know which cues are different
from which. I could do this by re-running the analysis with each cue type
as the reference level - then the effects reported would be pairwise with
respect to the reference cue, but this doesn't account for multiple
comparisons.
Thank you so much in advance for taking the time to wade through this and
offer me any thoughts. I'd also be happy to send the data and have someone
put together a script that seems reasonable to them, so I can learn the
nuances of LMM a little better.
Best,
Brad
Assistant Professor of Biology
Wabash College
Crawfordsville, IN
[[alternative HTML version deleted]]
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models