5/4/2021

knitr::opts_chunk$set(echo = FALSE)
library(plotly)
## Loading required package: ggplot2
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
library(ggplot2)
rodent <- read.csv("~/Desktop/Data_science/Data products/rodent.csv", na.strings=c("", "NA"))
rodent$species_id <- as.factor(rodent$species_id)
rodent$sex <- as.factor(rodent$sex)
rodent$genus <- as.factor(rodent$genus)
rodent$species <- as.factor(rodent$species)
rodent$taxa <- as.factor(rodent$taxa)
rodent$plot_type <- as.factor(rodent$plot_type)
rodent <- na.omit(rodent)
Dipodomys <- subset(rodent, genus == "Dipodomys")

Introduction

  • Dipodomys sp. are found in arid regions in western North America.
  • Move by jumping (hence their name)
  • Live in burrows
  • Eat seeds
  • Predators include rattlesnakes and coyotes, among several others

Dipodomys merriami

Dipodomys merriami

Hindfoot length vs weight

Genus relationship

  • Well defined quadratic relationship between hindfoot length and weight
  • Model: y-hat = 154.5610535 + -8.9912505x + 0.1649645x2
  • Adjusted R2 = 0.8578854

Hindfoot length vs weight by species

Species relationships

  • Poorer fits than the genus as a whole.
  • Large variation and multiple outliers within species
  • merriami R2 = 0.127625
  • ordii R2 = 0.0795305
  • spectabilis R2 = 0.2257113

Data Source