pikas: Data on presence of pikas and marmots from Front Range Pika...

Description Usage Format References Examples

Description

Original data had lat and long for most sites. Elevations estimate using the elevatr package (https://cran.r-project.org/web/packages/elevatr/vignettes/introduction_to_elevatr.html)

Usage

1

Format

A data frame

lat

latitude of survey site

long

longitude of survey site

pika.pres

Are pikas present or absent from the site

marmot.pres

Are marmots present or absent

talus.area

Description of area of talus at site

elev.m

Elevation of site

group

Designates whether no focal species seen, pikas only, marmots only, or both

References

Front Range Pika Project. http://www.pikapartners.org/cwis438/websites/FRPP/Home.php?WebSiteID=18

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
## Load packages

library(ggplot2)
library(ggpubr)

## Explore data graphically

### Plot boxplots
ggboxplot(data = pikas,
          y = "elev.m",
          x = "group",
          fill = "group")

### Plot histograms
gghistogram(data = pikas,
          x = "elev.m",
          title = "All data")

gghistogram(data = pikas,
          x = "elev.m",
          facet.by = "group",
          fill = "group",
          title = "Faceted by group")

## Plot means with 95% confidence intervals
ggerrorplot(pikas,
  x = "group",
  y = "elev.m",
  desc_stat = "mean_ci",
  add = "mean")

## 1-way ANOVA

### null model
model.null <- lm(elev.m ~ 1, data = pikas)

### model of interest
model.alt <- lm(elev.m ~ group, data = pikas)

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

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

### Bonferonni correction
pairwise.t.test(x = pikas$elev.m, g = pikas$group,
      p.adjust.method = "bonferroni")

## Tukey test

### re-fit model with aov()
model.alt.aov <- aov(elev.m ~ group, data = pikas)

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

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