0
$\begingroup$

Example data:

Temp      Site     Bleached  Year
20         A          Y      2001
25         A          Y      2004
20         A          Y      2008
25         A          Y      2011
32         A          N      2001
35         A          N      2004
32         A          N      2008
35         A          N      2011
46         B          Y      2001
23         B          Y      2004
46         B          Y      2008
23         B          Y      2011
23         B          N      2001
43         B          N      2004
23         B          N      2008
43         B          N      2011
33         C          Y      2001
23         C          Y      2004
33         C          Y      2008
23         C          Y      2011
32         C          N      2001
37         C          N      2004
32         C          N      2008
37         C          N      2011

I have made 3 line graphs of temperature across time where the mean temperature at each time for bleached / unbleached is plotted. I'd like to compare if the plots are significantly different in how much they vary within themselves. So for example, one graph has massive peaks and troughs, another is relatively stable. I'd like to analyse this statistically to say they are significantly different so I would think that as I'm analysing the variance in these data, an ANOVA should be used?

Could I use a two-way ANOVA for this, if normality is assumed?

I am using the following formula to input it into R, but I'm not worried about the R side of it. I know the formula looks at the interaction:

Site 1 ~ Site 2 * Site 3

But if I ignore that and just look at main effects, will a two-way ANOVA be appropriate or is there a better way to just look at differences minus interactions?


I missed quite an important edit the first time. I just want to compare how much each site varies within itself over time. I am looking at how variable temperature has an impact on predictability of bleaching / non-bleaching corals. Therefore I need to see if the variability is significant between the sites to make conclusions regarding the bleaching status.

$\endgroup$
  • 1
    $\begingroup$ As it stands your formula does not match your question which is not quite clear either. Can you edit more details into your question? $\endgroup$ – mdewey Nov 11 '16 at 14:56
  • $\begingroup$ Edited, hopefully clearer now. $\endgroup$ – MJ98 Nov 12 '16 at 15:07
  • $\begingroup$ It is clearer, thank you, but one key element of the question is ambiguous: could you explain more precisely what a "difference in temperature variance from the mean across the site" might be? It sounds like you want to compare variances between groups, but (because that would be somewhat unusual) perhaps you really intend to compare means? And would "across the site" mean between sites or possibly between dates within sites? $\endgroup$ – whuber Nov 12 '16 at 15:20
  • $\begingroup$ Sorry i missed quite an important edit the first time. I think that should be much clearer now. I just want to compare how much each site varies within itself over time. I am looking at how variable temperature has an impact on predictability of bleaching/non-bleaching corals. Therefore i need to see if the variability is significant between the sites to make conclusions regarding the bleaching status. Thanks $\endgroup$ – MJ98 Nov 12 '16 at 15:32
0
$\begingroup$

What you are interested in here is essentially heteroscedasticity. It is possible to test if the variances differ. Typically, you would get the absolute values of the differences from the mean or median of each group and run a 2x2 ANOVA on those sets of deviations. Using the mean will be a little more efficient when the data are normal, but a little less robust when they are not.

However, you seem to have short time series here. That makes this a little more complex. Using deviations from a single number (either the mean or the median) assumes the series is stationary. That may not be true. For example, the temperatures could be trending upwards over time, with one series of temperatures tracking very closely to the trend (little residual variability) whereas another series might not have a prominent trend but may fluctuate around a mean value (real variability), and yet the first case could look like more variability than the second. You need to figure out which you are interested in detecting. A simple solution would be to fit a straight line to the temperatures within each combination of factors and use the residuals from that fit.

There are a couple more issues here. First, the data in the analysis described above would not be independent, so the p-value (e.g.) would be wrong. To address this, you would need to use a mixed effects model, a GEE, a robust sandwich estimator, or model the non-independence with generalized least squares (GLS). With only 6 units, it is hard to say what approach would be viable.

The last issue is that, from your comment, I gather you want to understand the impact of varying temperatures on bleaching. That means that the model you really want is:

Bleached ~ temp.variance + Site

However, it appears that you used an outcome dependent sampling strategy for your study and that your multiple temperatures are really pseudoreplications. That isn't necessarily lethal, but it requires special methods that I am not familiar with. Perhaps someone else could address that issue.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.