While the topics covered are broad, each week will feature different examples from genetics, ecology, molecular, and evolutionary biology highlighting uses of each individual set of techniques.

W&S = Whitlock and Schluter, W&G = Wickham and Grolemund, U/P for linked pdfs = biol607

Change .html to .Rmd in your browser to get the markdown

Turning in Homework: All homework should be completed using RMarkdown. You’ll freely mix answers in text and code there. Please submit both the .Rmd and .html output of your homework. If there are data files associated with your homework, when working on it, please make sure you are using the

homework/
  |— markdown
  |— data

directory structure, so that all data is in ../data/ relative to where your homework markdown and outputs are. Please standardize filenames as follows: number_lastName_firstName_2020.Rmd where number is the homework number (you’ll see it in the homework assignment’s filename - and make sure to include the 0s for numbers like 01), and your last and first names - well, you should know them!

To submit homework, go to https://www.dropbox.com/request/MgLy0OxePC4QN8ZDgQ0X and upload the files.

Block 1: Introduction to Programming and Reproducibility

Week 2.

9/14/2020
Lecture: Descriptive statistics, and the creation of good observational sampling designs. - Sampling and Simulation for Estimation.
Lab Topic: Sampling and simulation. Libraries in R. Dplyr.
Reading: W&S 1,3-4, W&G Chapters on data transformation and pipes, Dplyr cheat sheet
Optional Reading: Cumming et al. 2007 on SDs, SEs, and CIs, Simpler Coding with Pipes, Managing Data Frames with the Dplyr package
Etherpad: https://etherpad.wikimedia.org/p/sampling-2020
Packages for the Week: dplyr - install.packages(c("dplyr", "purrr"))
In Class Code: Code from Lab for dplyr, Code from Lab for simulation from a population, Code from Lab for Bootstrapped SE
Homework: R, Dplyr, and Iteration

Week 3.

9/21/2020
Lecture: More on simulation of sample properties, Data visualization
Lab Topic: Introduction to ggplot2.
Reading: W&S Chapter 2, Unwin 2008, W&G Chapters on Data Vizualization and Graphics for Communication, DC Starting with Data
Optional Reading: Friendly 2008 on History of Data Viz, Fundamentals of Data Visualization - note, this is a whole book, but scan it - it’s amazing
Etherpad: https://etherpad.wikimedia.org/p/dataviz-2020
Packages used this Week: ggplot2, ggridges, ggdist - install.packages(c("ggplot2", "ggridges", "palmerpenguins", "ggdist"))
Cheat Sheets: Ggplot2 cheat sheet, Choosing a good chart cheat sheet
In Class Code: Intro to data and ggplot2
Homework: ggplot2 homework

Week 4.

9/28/2020
Lecture: Functions, Data import, libraries, factors and forcats, Tidy data, Joins
Data: Hemlock
Reading: Data organization in spreadsheets, 10 Commandments for Good Data Managament, W&G Chapters on functions, tidy data, Strings, and Dates
Cheat Sheets: Reading data into R.
Packages: install.packages(c("janitor", "skimr", "lubridate", "tidyr", "readr", "readxl", "tibble")) - readr, readxl, tibble, skimr, janitor, visdat Etherpad: http://etherpad.wikimedia.org/p/607-tidy-2020
In Class Code: functions, loading data, data reshaping, created data
Homework: Functions and Pivot homework

Block 2: Regression and Inference

Week 5.

10/5/2020
Lecture: Introduction to Regression: Correlation and Regression, Fit and Precision
Lab Topic: Linear regression, diagnostics, visualization, and data
Reading: W&S 16-17, W&G on model basics, model building
Etherpad: https://etherpad.wikimedia.org/p/607-lm-2020
In Class Code: reproducible examples, lm
Homework: Correlation and Linear Models

Week 6.

10/12/2020
Lecture: Ways of Knowing: NHST and Likelihood with LRT
Lab Topic: Likelihood and linear models, data
Reading: W&S 20, W&G Chapter Iteration
Etherpad: https://etherpad.wikimedia.org/p/607-lm-eval-2020, https://etherpad.wikimedia.org/p/607-mle-2020
In Class Code: linear models with likelihood
Packages for The Week: install.packages(c("MASS", "profileModel", "bbmle", "rsample"))
Homework:inference and likelihood

Block 3. Further Adventures in Regression

Week 9

11/2/2020
Lecture: Tidy Tuesday for Election Day, It s All Linear Models; t-test edition
Lab Topic: Comparing Means, Final Proposal Meetings
Reading: Common statistical tests are linear models, W&S Chapters 11-12
Packages for The Week: install.packages(c("car", "emmeans", "multcompView", "contrast"))
Etherpad: https://etherpad.wikimedia.org/p/607-linear_everywhere-2020 In Class Code: comparing two means

Week 10.

11/9/2020
Lecture: Categorical Predictors and ANOVA part 1, part 2
Lab Topic: One-Way ANOVA
Lab Data: Multiple Files
Reading: W&S Chapter 14-15, Cottingham et al. 2005
Packages for The Week: install.packages(c("car", "emmeans", "multcompView", "contrast")) Etherpad: https://etherpad.wikimedia.org/p/607-anova-2020 In Class Code: lots of anova

Week 11.

11/16/2020
Lectures: Factorial ANOVA, General Linear Model: ANCOVA and MLR
Lab Topic: Discussion of Hurlbert, Cottingham, Factorial ANOVA
Lab Data: Multiple Files
Reading: W&S 18, Hurlbert 1984
Optional Reading: Analysis of variance with unbalanced data: an update for ecology & evolution
Etherpad: https://etherpad.wikimedia.org/p/607-many-predictors-2020
In Class Code: lots of anova
Homework: GLM Homework

Block 4. Asking Questions of the World

Week 13.

11/30/2020
Lecture: Causal Inference and Experiments, Fundamental Experimental Designs from a Causal Perspective
Reading: A Beastiary of Experimental Designs, Experimental Design Reading Packet
Optional Readings: Non-assigned papers in the packet, The whole Ecology Special Section on P Values is incredible reading.
Etherpad: https://etherpad.wikimedia.org/p/607-experiments-2020
Lab: Discussion of papers (see here for assignments)

Block 5: Modeling Error and Further Adventures in Regression Models

Week 15.

12/14/2020
Lecture: Modeling Error: Generalized Least Squares and Heteroscedasticity, Entering a non-normal world - Modeling count data with Genearlized linear models.
Data: GLS Data, GLM Data
Lab Topic: Generalized Linear Models
Packages for the Week: install.packages(c("MASS", "readxl", "betareg", "DHARMa"))
Reading: O’Hara 2009 through section on GLMs, O’Hara and Kotze 2010, Wharton and Hui 2011, Hartig DHARMa vignette

FINAL PRESENTATIONS Fri. Dec 18th in Lab Slot