In: Computer Science
Pringle et al (2015) experimentally examined the effects of fire and herbivory by elephants on the density of geckos that live in trees in Kenya, using 4 ha study plots. They excluded elephants from half of the plots and left the other half unfenced. Then they burned the vegetation in half of the plots and left the other half unburned (see sketch below). Each treatment was replicated once in three different areas used as blocks: Central, North and South. Four months after the treatments were applied, the researchers estimated the density of the gecko species Lygodactylus keniensis in each plot (number of individuals / m2 ).
Block | Elephant Treatment | Fire Treatment | July 2013 lizard density per ha | |
Central | Elephants present | Burned | 853.33 | |
Central | Elephants present | Unburned | 183.33 | |
Central | No elephants | Burned | 270 | |
Central | No elephants | Unburned | 256.67 | |
North | Elephants present | Burned | 784.44 | |
North | Elephants present | Unburned | 298.89 | |
North | No elephants | Burned | 417.78 | |
North | No elephants | Unburned | 212.22 | |
South | Elephants present | Burned | 661.11 | |
South | Elephants present | Unburned | 356.67 | |
South | No elephants | Burned | 380 | |
South | No elephants | Unburned | 388.89 |
Using R, calculate the standard deviations of the four treatments
we can rectify the column names of the data as below to enter in R
Block | Elephant.Treatment | Fire.Treatment | lizard.density |
Central | Elephants present | Burned | 853.33 |
Central | Elephants present | Unburned | 183.33 |
Central | No elephants | Burned | 270 |
Central | No elephants | Unburned | 256.67 |
North | Elephants present | Burned | 784.44 |
North | Elephants present | Unburned | 298.89 |
North | No elephants | Burned | 417.78 |
North | No elephants | Unburned | 212.22 |
South | Elephants present | Burned | 661.11 |
South | Elephants present | Unburned | 356.67 |
South | No elephants | Burned | 380 |
South | No elephants | Unburned | 388.89 |
In R we can fit the ANOVA as below:
Now we can answer the given questions using above ANOVA table
Answer(a):
The factor “Fire” has 1 degree of freedom
Answer(b):
The factor “elephants” has 1 degree of freedom
Answer(c):
The interaction has 1 degree of freedom
Answer(d):
The block effect has 2 degrees of freedom
Answer(e):
We have 6 degrees of freedom for error.
Answer(f):
The total number of experimental units is 12.
R-code:
data=read.table("clipboard",sep="\t",header=T)
data$Block=as.factor(data$Block)
data$Elephant.Treatment=as.factor(data$Elephant.Treatment)
data$Fire.Treatment=as.factor(data$Fire.Treatment)
data.aov=with(data,aov(lizard.density~Block+Elephant.Treatment*Fire.Treatment))
anova(data.aov)