Publications by Michael Hunt
Use of ggplot2
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
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
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
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
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
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
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
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
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
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)