Section 43 One-way ANOVA: Exercise


43.1 Exercise 1:

Blood pressure of individuals and treatment group: BP.csv

  • Download the csv data file: BP.csv

  • Fit a one-way anova model to find the difference between Group for the variable MAP.

  • Create your own customised R function to conduct one-way anova and compare the results with the lm function.

  • The function should return the anova table and estimates of mean, SE, 95% CI


43.2 Exercise 2:

Data on sepal and petal length and width for different iris species

  • Download the csv data file: iris.csv

  • Fit a one-way anova model to find the difference between Species for the variable Sepal.Length and Sepal.Width from the iris data


43.3 Exercise 3:

The colony forming unit counts of different bacteria grown on different cultures: bacteria.csv

  • Download the csv file of bacteria data: bacteria.csv

  • The data include counts of colony forming unit (cfu) of a bacterium species with three different types of culture. Each culture has 10 replications.

  • Test if the mean cfu differs between the cultures.

  • Present the estimated mean, SE and confidence intervals.

  • Suggest methods to compare the pairwise means between the cultures.


43.4 Exercise 4:

Measurements of drytime and shape of grass with four machines: grass.csv

  • Download the grass data: grass.csv

  • The data include measurements of two variables Drytime and Shape for four different types of machines.

  • Test if the mean of these two variables differ between the machines.

  • Present the estimated mean, SE and confidence intervals.

  • Suggest methods to compare the pairwise means between the machines.


43.5 Exercise 5:

Growth of wheat plants in different pots: pots.csv

  • Download the pots data: pots.csv

  • Load the ‘pots’ data.

  • Seven plants of wheat are grown in pots and given no fertilizer treatment. A further eight plants from the same source are grown in similar conditions but given a fertilizer treatment.

  • Look to see whether the fertilizer has an effect on seed production by carrying out a two-sample t-test.

  • Do a one-way analysis of variance for the data and compare the results with those from the t-test.

  • Plot the means, and also plot the data values. Does the plot with the data values confirm what you have found in the analysis of variance?