Load the necessary libraries
library(tidyverse)
## Loading tidyverse: ggplot2
## Loading tidyverse: tibble
## Loading tidyverse: tidyr
## Loading tidyverse: readr
## Loading tidyverse: purrr
## Loading tidyverse: dplyr
## Conflicts with tidy packages ----------------------------------------------
## filter(): dplyr, stats
## lag(): dplyr, stats
Polis et al. (1998) were intested in modelling the presence/absence of lizards (Uta sp.) against the perimeter to area ratio of 19 islands in the Gulf of California.
Format of polis.csv data file
ISLAND | RATIO | PA |
---|---|---|
Bota | 15.41 | 1 |
Cabeza | 5.63 | 1 |
Cerraja | 25.92 | 1 |
Coronadito | 15.17 | 0 |
.. | .. | .. |
ISLAND | Categorical listing of the name of the 19 islands used - variable not used in analysis. |
RATIO | Ratio of perimeter to area of the island. |
PA | Presence (1) or absence (0) of Uta lizards on island. |
The aim of the analysis is to investigate the relationship between island parimeter to area ratio and the presence/absence of Uta lizards.
polis = read_csv('data/polis.csv', trim_ws=TRUE)
## Parsed with column specification:
## cols(
## ISLAND = col_character(),
## RATIO = col_double(),
## PA = col_integer()
## )
glimpse(polis)
## Observations: 19
## Variables: 3
## $ ISLAND <chr> "Bota", "Cabeza", "Cerraja", "Coronadito", "Flecha", "G...
## $ RATIO <dbl> 15.41, 5.63, 25.92, 15.17, 13.04, 18.85, 30.95, 22.87, ...
## $ PA <int> 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1
Model formula: \[ y_i \sim{} \mathcal{Bin}(n, p_i)\\ ln\left(\frac{p_i}{1-p_i}\right) = \beta_0 + \beta_1 ln(x_i) \]
Polis, G. A., S. D. Hurd, C. D. Jackson, and F. Sanchez-Piñero. 1998. “Multifactor Population Limitation: Variable Spatial and Temporal Control of Spiders on Gulf of California Islands.” Ecology 79: 490–502.