Publications by Michael Hunt

Use of ggplot2

23.11.2022

Sources I could fill page after page with suggested resources on how best to do visualisations (graphs, as we used to call them). Here are a few that I have used and found useful. Some are on the detail of how to use the ggplot2 package - which you will most likely use in your dissertation - and some are on more general principles of making effe...

29266 sym R (7313 sym/48 pcs) 28 img

Chi Square Contingency

23.11.2022

Taken from Chapter 5: Beckerman, Childs and Petchey: Getting Started with R Chi-square contingency analysis The data We are going to analyse some data on counts of ladybirds found in an industrial and in a rural location. Some of the ladybirds are red and some are black. We would like to test for whether there is an association between the lady...

6181 sym R (2404 sym/18 pcs) 2 img

Fisher's Exact Test

11.01.2023

Fisher’s Exact Test can be used in place of a chi-square test for independence in cases where counts are too low to make the chi-square approximation appropriate for calculating a p-value. A rule of thumb often used for this is that a chi-square test is no longer reliable when there are fewer than five or so counts in every cell of the continge...

6983 sym 3 img

Two-sample t-test

11.03.2020

Preliminaries In this exercise we find out how to use R to run a t-test, to determine whether there is evidence of a differnce between two populations. The exercise is taken from Chapter 5: Beckerman, Childs and Petchey: Getting Started with R. Working directory Set your Rstuff folder as the working directory. R markdown Create a new R Notebook...

5266 sym R (483 sym/9 pcs)

Pharmacokinetics

10.03.2020

If a drug is present in the body at concentration \(C\) then its rate of removal from the body is normally given by \[ \begin{equation} \dfrac{dC}{dt}=-k_eC \end{equation} \] where \(k_e\) is known as the elimination constant for the drug. It is related to the half life of the drug, as we shall see. We see from this equation that the rate of elim...

3689 sym R (1827 sym/14 pcs) 3 img

Air Quality analysis

09.03.2020

Introduction For this exercise you are required to carry out exploratory analysis of the data from the air quality data set within the R language. This data set contains various measurements relating to air quality that were carried out over a five month period in 1973 in New York. The idea of the exercise, besodes giving you some practice in R, ...

5498 sym R (1297 sym/17 pcs) 1 img

Chi-Square contingency test

04.03.2020

Taken from Chapter 5: Beckerman, Childs and Petchey: Getting Started with R Chi-square contingency analysis The data We are going to analyse some data on counts of ladybirds found in an industrial and in a rural location. Some of the ladybirds are red and some are black. We would like to test for whether there is an association between the lady...

3081 sym R (2176 sym/20 pcs) 2 img

WEBS Porth data exercises

26.02.2020

Introduction In this exercise we will analyse the WEBS Porth data that you are using in your Zoology in Practice module. We will use this as an example data set that will give you practice in using R to answer whatever questons you might have of the data. You can use the code you write here as examples that you can adapt whenever you want to do s...

13180 sym R (3380 sym/26 pcs)

Basic Chi-Square test

04.03.2020

Two exercises: 1: Uniform probabilities Here we investigate a case where under a null hypothesis we would expect data to be uniformly distributed among a number of available categories. Do certain star signs favour success in life? (we suspect not!) In a survey of 256 chief executives of Fortune 500 companies, the number with each of the 12 sta...

1987 sym R (508 sym/5 pcs)

McNemar and the exact binomial change tests

14.05.2020

References Agresti, A. (1990). Categorical data analysis. Wiley. pp 350–354 Siegel, S. and Castellan Jr., N. J. (1988) Nonparametric statistics for the behavioral sciences, 2nd ed., McGraw-Hill. Ch4 pp 38-44 for the Binomial Exact test and Ch5 pp 75-80 for the McNemr Change Test. The Function The McNemar test for the significance of changes is...

7164 sym R (1338 sym/16 pcs)