2025-02-08

Dataset trees

birds = read.csv('BirdNest.csv')
head(birds, n=4)
  rownames                   Species                     Common Page Length
1        1         Tyrannus tyrannus           Eastern Kingbird  360   20.0
2        2 Myiodynastes luteiventris Sulphur-bellied Flycatcher  368   20.0
3        3     Myiarchus cinerascens     Ash-thoated Flycatcher  372   20.0
4        4      Myiarchus tyrannulus   Brown-crested Flycatcher  372   22.5
  Nesttype Location No.eggs Color Incubate Nestling Totcare Closed.
1      cup    decid     3.5     1     17.0     17.0    34.0       0
2   cavity    decid     3.5     1     15.5     17.0    32.5       1
3   cavity    decid     4.5     1     15.0     15.0    30.0       1
4   cavity    decid     4.5     1     14.0     16.5    30.5       1

Code for birds Length vs. Totcare

mod = lm(Totcare ~ Length, data=birds)
x = birds$Length; y = birds$Totcare

xax = list(
  title = "Length",
  titlefont = list(family="Modern Computer Roman"),
  range = c(0,35)
)
yax = list(
  title = "Total Care Time",
  titlefont = list(family="Modern Computer Roman"),
  range = c(0,40)
)

fig = plot_ly(x=x, y=y, type="scatter", mode="markers", name="Data",
              width=800, height=430) %>%
  add_lines(x = x, y = fitted(mod), name="Fitted") %>%
  layout(xaxis = xax, yaxis = yax)

birds Length vs. Total Egg Care Time

Number of Eggs vs. Length

Estimating Eggs by Bird Length

\(\text{Egg Count} = \text{7.106}*\alpha^2 + \text{12.413}*\alpha + \text{27.735}\)

Incubation vs. Nesting time

Estimating Nesting by Incubation Time

\(\text{Nesting Time} = \text{1.255} * \alpha + \text{-2.362}\)