Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

correct formatting for repeated measures ANOVA

May 20, 2020 3:10 PM
(1235 views)

I sat in on an interesting webinar by Jian Cao a few weeks ago on using the mixed model platform, during which I learned that you actually don't need to set up repeated measures ANOVA designs under MANOVA. This opens up more flexibility, so I wanted to try it. I have a series of corals ("pucks" in the attached data file) that were repeatedly measured (as color) over time, and I was interested in testing for the fixed effects of treatment (two temperatures), genotype (5-6 genotypes), time (calendar dates), and their interaction. I know how to do this under the MANOVA platform, but if I add the two fixed effects to the mixed model platform, then "Date" as the repeated measure, one of two things happens. It either ONLY gives the output of the fixed effects (i.e., NOT the effect of time), OR, if I include "Date" as a fixed factor as well, it causes it to crash, potentially since the software sees "Date" in two places. What Jian evidently did was trick JMP by calling "Date" something else in his example. I think he had "Time" (which was date x time) as the repeated measure and then "Date" (=date only) as a fixed factor. Surely I don't actually have to do recode a dummy variable like this every time?! I guess I could recode "Date" to "experiment day" and then have "date" be the repeated measure and "experiment day" be in the fixed factor model, but it seems like there must be a simpler way. In other words, how do I set it up under the mixed model platform to where I also get the time effect (as can be done under the MANOVA platform)? Or maybe interaction effects with the repeated measure are NOT possible under mixed model (and only with MANOVA)?

Anderson B. Mayfield

5 REPLIES 5

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: correct formatting for repeated measures ANOVA

Hi, Anderson,

You can use both Date as a fixed effect and as a repeated column in mixed models. However, in your case, when you add Date, Treatment, Genotype and their interactions as fixed effect JMP warns that there are linear dependencies among the fixed effects ( I used Average column from your data as Y). This does not seem to have to do with the mixed models; you would receive the same warning when you just run a Standard Least Squares model as shown below. If you only add the three main effects the mixed models will run.

I don’t know what exactly causes the linear dependencies, but I see you had an unbalanced design. In my repeated measures example from a balanced design, I have no problems running the model with the main effects and interactions using the calendar dates both as a fixed effect and a repeated column. (Note that in my example I labeled the calendar date as Time.)

The trick you mentioned me saying is that when you select AR(1) as the repeated structure the repeated column must be continuous, so I created a continuous Days column from the original Time column.

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: correct formatting for repeated measures ANOVA

Thank you for your response. I think I actually figured it out, and it does have to do with the unbalanced design you mentioned. Basically, it's a study in which organisms die throughout the study, so the sample size gets progressively smaller each date of assessment. If you just look at the first several study times, you can, as you said, use "Date" as a fixed term and as a repeated measure, which is good since that's what I want.

I actually wonder if these sorts of diminishing sample size issues actually require a completely different suite of statistical approaches (like those used for survival data)? Maybe I should open up a new discussion on that: what's the best approach for when your sample size shrinks over time due to death of study animals? If you try to use the MANOVA platform with these kinds of missing data dataset, it won't work at all! But I don't want to omit the later sampling times with fewer samples since those are potentially the most interesting. Anyway, thanks for looking into this, and sorry for raising a red flag when it was, in fact, an issue with my dataset (and not the software)!

I actually wonder if these sorts of diminishing sample size issues actually require a completely different suite of statistical approaches (like those used for survival data)? Maybe I should open up a new discussion on that: what's the best approach for when your sample size shrinks over time due to death of study animals? If you try to use the MANOVA platform with these kinds of missing data dataset, it won't work at all! But I don't want to omit the later sampling times with fewer samples since those are potentially the most interesting. Anyway, thanks for looking into this, and sorry for raising a red flag when it was, in fact, an issue with my dataset (and not the software)!

Anderson B. Mayfield

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: correct formatting for repeated measures ANOVA

Excuse my ramblings, but I'm a bit confused.

What questions are you trying to answer? The "color" is an indicator of the health of the coral? I don't see a column labeled color? Im do see a column labeled Average. What is this? Average of what? If there is an average what is the associated standard deviation? Are you taking photos of the coral and then measuring the color? Have you quantified measurement precision? What is coral position?

The factors you are interested in are:

**1. Treatment** - temperature (levels identified as stable and variable?). Why not record the temperatures you are experimenting at?

**2. Genotype** (there are 6 of these although there are 3 data points in your data set with no values and no photo?). Why did you exclude the values you excluded? ,

3. **Time** (by this you mean days?). I don't understand this as a factor? I'm not sure why you are classifying this as a fixed effect? This is not actually a manipulated factor? Would you be better off to create a response variable that is time to reach a certain color? Or time to death? Or create a regression line using the repeated measures over time and analyze the slope of this line.

You didn't include your model. You want the linear effect of Treatment, the linear and non-linear terms for Genotype (up to 4th order?). Interactions of Treatment and Genotype? Interactions with Time? I'm not sure this makes sense to me...do you mean instability?

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: correct formatting for repeated measures ANOVA

Created:
May 21, 2020 1:57 PM
| Last Modified: May 22, 2020 3:13 AM
(1173 views)
| Posted in reply to message from abmayfield 05-20-2020

Hi @abmayfield

when it comes to specification of a repeated measures anova there is a simplified add in: Full Factorial Repeated Measures ANOVA Add-In

https://www.youtube.com/watch?v=fh8jiFf2z-o

Perhaps it could help you.

ron

To view a playlist and download materials shown in this eCourse, visit the course page at: http://www.jmp.com/en_us/academic/ssms.html

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: correct formatting for repeated measures ANOVA

Thanks everyone. I have already downloaded this add-in. I probably should have explained the data table I posted, too, but we basically had two temperature profiles (stable vs. variable), several genotypes, and a color intensity ("average" since it was averaged across multiple pictures). Basically, we wanted to see if the color intensity (as an R-intensity, which is essentially inversely correlated with pigmentation) increased more for stable or variable temperature corals that were later exposed to high temperatures. When you check date, temperature treatment, and genotype in the model, you can see some interesting effects, though not necessarily related to the acclimation temperature treatment (the effect of genotype is greater). An easier way to have done it would have been to have calculated the change in color over time and analyzed the color increase/decrease in a two-way ANOVA (temperature treatment x genotype). Then, no repeated measures ANOVA would even have been necessary to begin with!

Anderson B. Mayfield

Article Labels

There are no labels assigned to this post.