# SLE240 Analysing Marine Dynamics: Anova And Ancova Practical 3 Assessment Answer

Pages: 4 Words: 890

## Question :

SLE240 Analysing Marine Dynamics

Practical 3: ANOVA & ANCOVA

Preparation for this practical class:

Before coming to this practical class, it is expected that you:

2. Know that type of transformations to apply and when

Section 1: ANOVA (15 points)

Exercise 1 (10 points):

Researchers investigated the impact of zinc contamination (and other heavy metals) on the diversity of diatom species in freshwater streams. The diversity of diatoms (number of species) and degree of zinc contamination (categorized as either of high, medium, low or natural background level) were recorded from between four and six sampling stations within each of six streams known to be polluted.

The data for is located in the Practical 3 folder called “medley.csv”.

Your job is to use these data to test the null hypothesis that there were no differences in the diversity of diatoms between different zinc levels. The key components that you will we need to cover off on for this task are outlined below. Make sure to show your code and results that support your conclusions.

1) Assess normality/homogeneity of variance using boxplot of species diversity against zinc group (2 points).

Hint: it may be useful to first reorganise the levels of Zinc into a more logical order using the following code:

medley\$ZINC <- factor(medley\$ZINC, levels=c('HIGH', 'MED', 'LOW', 'BACK'), ordered=F)

2) Test the null hypothesis of whether group means are all equal – perform the ANOVA (i.e. fit the linear model) of species diversity versus zinc-level group and examine the diagnostics (residual plot). Include the results of your ANOVA table and conclusions. (4 points)

3) Perform a post-hoc Tukey’s test to investigate pairwise mean differences between all groups. Include your conclusions based on the results. Hint: you will need to load the multcomp package. (2 points)

4) Summarise the findings with an appropriate figure. (2 points)

Exercise 2 (5 points):

Researchers investigated the impact of different feed treatments (‘Control’, ‘Feed A’, ‘Feed B’, ‘Feed C’, and ‘Feed D’) on the length of fish. The data for this exercise is located in the Practical 3 folder called “feed.csv”.

Your job is to use these data to test the null hypothesis that there were no differences in the length of fish between different feed types. The key components that you will we need to cover off on for this task are outlined below. Make sure to show your code and results that support your conclusions.

1) Check the assumptions of normality and equal variance. (2 point)

2) Perform the appropriate statistical test and make your conclusions. (2 points)

3) Summarise the findings with an appropriate figure. (1 point)

Section 2: ANCOVA (15 points)

Exercise:

To investigate the impacts of sexual activity on male prawn longevity researhcers measured the longevity of male prawn with access to either one virgin female (potential mate), eight virgin females, one pregnant female (not a potential mate), eight pregnant females or no females. The available male prawn varied in size and since size is known to impact longevity, the researchers randomly allocated each individual prawn to one of the five treatments and also measured thorax length as a covariate

The data for is located in the Practical 3 folder called “prawn.csv”.

Your job is to find out if there is evidence that the treatment effect (i.e. access to mates) has an influence on male prawn longevity. The key components that you will we need to cover off on for this task are outlined below. Make sure to show your code and results that support your conclusions.

1) Assess assumptions of normality and homogeneity. Hint: a transformation may be necessary – be sure to demonstrate your ability to determine this. (2 points)

2) Assess assumptions of linearity, homogeneity of slopes. (2 points)

3) Check that the ranges of the covariate are similar for each level of the categorical variable. (1 point)

4) Fit the linear model and produce an ANOVA table to test the null hypotheses that there are no effects of treatment on the longevity of male prawn adjusted for thorax length. Note that as the design is inherently imbalanced (since there is a different series of thorax lengths within each treatment type). Type I sums of squares are inappropriate. Therefore, Type III sums of squares will need to be used. (8 points)

5) Summarise the findings with an appropriate figure (2 points).