antlers: Simulated data on the effects of diet on deer antlers

Description Usage Format Details References Examples

Description

Data simulated based on summary information in Asleson et al. (1997). Deer were fed three different diets that varied in the timeing of high protein. Data are suitable for analysis with 1-way ANOVA.

Usage

1

Format

A data frame

diet

Experimental diet during both spring and summer. Hi.Hi = High quality diet in both season. Hi.Lo = high quality diet in spring but poor in summer.

mass

Antler mass in grams

circum

basal circumference in mm

beam

Length of main beam of antler in mm

spread

spread between points in mm

diet.name

further details on diet treatment

Details

See the vignette "Intro to 1-way ANOVA: impacts of diet on deer antlers" for a thorough exploration of these data. The examples below demonstate basic plotting and 1-way ANOVA.

References

Asleson et al. 1997. Effects of seasonal protein restriction on antlerogenesis and body mass in adult male white-tailed deer. Journal of Wildlife Management 61.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
## Load packages

library(ggplot2)
library(ggpubr)

## Explore data graphically

### Plot boxplots
ggboxplot(data = antlers,
          y = "mass",
          x = "diet",
          fill = "diet")

### Plot histograms
gghistogram(data = antlers,
          x = "mass",
          title = "All data")

gghistogram(data = antlers,
          x = "mass",
          facet.by = "diet",
          fill = "diet",
          title = "Faceted by diet")

## Plot means with 95% confidence intervals
ggerrorplot(antlers,
  x = "diet",
  y = "mass",
  desc_stat = "mean_ci",
  add = "mean",
  ylim = c(400,900))

## 1-way ANOVA

### null model
model.null <- lm(mass ~ 1, data = antlers)

### model of interest
model.alt <- lm(mass ~ diet, data = antlers)

### compare models
anova(model.null, model.alt)

## Pairwise comparisons after 1-way ANOVA
### no corrections for multiple comparisons
pairwise.t.test(x = antlers$mass, g = antlers$diet,
      p.adjust.method = "none")

### Bonferonni correction
pairwise.t.test(x = antlers$mass, g = antlers$diet,
      p.adjust.method = "bonferroni")

## Tukey test

### re-fit model with aov()
model.alt.aov <- aov(mass ~ diet, data = antlers)

### TukeyHSD() on model from aov()
TukeyHSD(model.alt.aov)

### Plot effect sizes
plotTukeysHSD(TukeyHSD(model.alt.aov))

brouwern/wildlifeR documentation built on May 28, 2019, 7:13 p.m.