Biology, images, analysis, design...
|"It has long been an axiom of mine that the little things are infinitely the most important" |
ANOVA for blocked designs
Worked example 1
Our first worked example uses interpolated
Draw boxplots and assess normalityPlot out data to get a visual assessment of the treatment and block effects, and assess how appropriate (parametric) ANOVA is for the set of data.
First impressions are that the block effect seems fairly small but there may well be a difference between habitats. There is nothing too horrendous in terms of distributions - at least nothing that a transformation would improve - so we proceed to an interaction plot.
Check for location × habitat type interactionWe start with a simple location × habitat type interaction plot. If there were no interaction between locations and habitat types, microbial activity (SCU) should follow parallel trends across habitat types for each of the different locations.
Microbial activity seems to follow similar trends across habitats in Nemah and Long Island, but not in Nahcotta. Hummocks have the highest SCU readings in Nahcotta, but one of the lowest in Nemah. We cannot make a general test on whether this interaction is significant because of the lack of replication. However, we can test for whether there is significant interaction of the multiplicative form using the Tukey non-additivity test.
There appear to be two versions of this test available in R - the version in the package
alr3 which is tukey.nonadd.test() and a version provided by
In this case P = 0.182. Using the conventional P < 0.05 level, we would say there is no evidence for a multiplicative interaction. However, using more liberal significance level of P = 0.25 (as widely recommended), there are clearly grounds for suspecting interaction. For now we will continue with the analysis, but will return to the point later.
Get table of means
Carry out analysis of variance
The habitat factor came out significant at P = 0.025.
In R there are several different ways to do this analysis.
Check model diagnostics
Since there is only one error term in this analysis, we can use the standard residual plots produced by R to examine diagnostics.
The residuals versus fitted plot shows no clear trend, and the residuals are reasonably
normally distributed. If we had random allocation of treatments within blocks, we could
proceed to comparing mean. But in this case we are dealing with an observational study
with no random allocation of treatments. Hence it would make sense to check the
homogeneity of covariances assumption by estimating
Unfortunately epsilon comes out at only 0.19 indicating a major deviation from sphericity. This casts serious doubt on the validity of the analysis. We attempted to fit the linear mixed effect model (using lme()) but the model with unstructured covariance structure would not converge, and none of the other covariance structures were significantly better than the compound symmetry model which gave the same P- value for the treatment factor of 0.0247.
Hence we proceed to test differences between habitats. In this case we will use Tukey's HSD test. One way to do it is to obtain a list of all differences between means and compare these differences with the honestly significant difference:
Only differences greater than 8.6 are significant at P = 0.05. Hence the only significant difference in microbial activity is between the eelgrass habitat and the picked habitat.
We get the same result if we use the glht() function in the multcomp package: