eco-detectives / eco_detective

Reading/coding group for The Ecological Detective
1 stars 3 forks source link

ch 6 and 7ish #10

Open oharac opened 6 years ago

oharac commented 6 years ago

hey all, I can't do the 25th - I think we were looking at chapter 6 and the first part of 7? It sounded like at least one or two other people weren't able to make it at all that day, or at least not locally, so maybe we can do a different day that week? Tues or Thurs work fine for me that week. Thoughts?

oharac commented 6 years ago

Chapter 6 check-in for me:

I felt like this chapter was reasonably straightforward... the loops seemed intuitive but also not too tough to do it dataframe/tidyverse style.

The bootstrapping took a little thought - the pseudocode seemed weird and overly complex, so I turned the dataframe of (20 rows of egg complement, clutch size, number of observations) into individual observations (102 observations of egg complement, clutch size) using the uncount() function from tidyr (new in the latest version I believe). Then I could use sample_frac(size = 1, replace = TRUE) to quickly get a bootstrap sample of the same size.

Once I figured that out, the bootstrap method seemed pretty powerful as a way to test the models against one another. I got very similar results to those in the book.