## Prior to Week 1

### Homework

1. **[Install R](https://cran.cnr.berkeley.edu/)**

1. **[Install RStudio](https://www.rstudio.com/products/rstudio/download/#download)**

1. **Remember to bring your laptop to class!**

### Resources

* Torfs, P., & Brauer, C. A (very) short introduction to R. Available: https://cran.r-project.org/doc/contrib/Torfs+Brauer-Short-R-Intro.pdf

* Short, T. R reference card. Available: https://cran.r-project.org/doc/contrib/Short-refcard.pdf

* RStudio. RStudio IDE cheat sheet. Available: https://www.rstudio.com/wp-content/uploads/2016/01/rstudio-IDE-cheatsheet.pdf

    **Note:** "Resources" are readings and materials available for your benefit if you would like additional detail on a topic. They are not required, but often are very helpful (especially things like cheat sheets and reference documents).


<br>


## Week 1: Introduction to R programming and data structures

### Lectures

* Tuesday, March 26: **[Lecture 01](./lectures/lecture01.html)** ([pdf](./lectures/lecture01.pdf) / [Rmd](./lectures/lecture01.Rmd))

* Thursday, March 28: **[Lecture 02](./lectures/lecture02.html)** ([pdf](./lectures/lecture02.pdf) / [Rmd](./lectures/lecture02.Rmd))

### Homework

1. **Required Reading**  

    a. FitzJohn, R. Nice R code: Designing projects. Available: https://nicercode.github.io/blog/2013-04-05-projects/
    
    a. Navarro, D. Section 2.1: Introduction to psychological measurement, through Section 2.2: Scales of measurement. In _Learning statistics with R_. Available: https://learningstatisticswithr.com/book/studydesign.html
    
    a. Wickham, H. Welcome, through Section 3: Functions. In _The tidyverse style guide_. Available: https://style.tidyverse.org/
    
        * Skim and refer back later when writing code
        
<!-- end of list -->

2. **[Assignment 1](./assignments/assignment1.html)** ([pdf](./assignments/assignment1.pdf) / [Rmd](./assignments/assignment1.Rmd)) (Due April 2)

### Resources

**Computing**

* Wilson, G., et al. (2017). Good enough practices in scientific computing. PLOS Computational Biology, 13(6), e1005510. doi: [10.1371/journal.pcbi.1005510](https://doi.org/10.1371/journal.pcbi.1005510)

* Navarro, D. Chapter 8: Basic programming. In _Learning statistics with R_. Available: https://learningstatisticswithr.com/book/scripting.html

**Statistics & Measurement**

* Navarro, D. Chapter 1: Why do we learn statistics? In _Learning statistics with R_. Available: https://learningstatisticswithr.com/book/why-do-we-learn-statistics.html

* McDonald, J. H. Types of biological variables. In _Handbook of biological statistics_. Available: http://www.biostathandbook.com/variabletypes.html

**Markdown & R Markdown**

* Pritchard, A. Markdown cheatsheet. Available: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet

* RStudio. R Markdown reference guide. Available: https://www.rstudio.com/wp-content/uploads/2015/03/rmarkdown-reference.pdf

* Xie, Y., Allaire, J. J., & Grolemund, G. R Markdown: The definitive guide. Available: https://bookdown.org/yihui/rmarkdown/

**Git & GitHub**

* Bryan, J., et al. Happy Git and GitHub for the useR. Available: https://happygitwithr.com/

* FitzJohn, R., & Falster, D. Nice R code: Introduction to version control using Git. Available: https://nicercode.github.io/git/

* GitHub Guides. Git handbook. Available: https://guides.github.com/introduction/git-handbook/

* GitHub. GitHub Desktop. Available: https://desktop.github.com/

* Zabor, E. C. Creating websites in R. Available: https://www.emilyzabor.com/tutorials/rmarkdown_websites_tutorial.html


<br>


## Week 2: Importing, working with, and exploring data

### Lectures

* Tuesday, April 2: **[Lecture 03](./lectures/lecture03.html)** ([pdf](./lectures/lecture03.pdf) / [Rmd](./lectures/lecture03.Rmd))  
    * [Gombe data](https://osf.io/s7d9d/)  
    * [Prussian horse-kick data](http://www.randomservices.org/random/data/HorseKicks.html)  
    * [Indo-European folktale data](https://royalsocietypublishing.org/doi/suppl/10.1098/rsos.150645)  

<!-- end of list -->

* Thursday, April 4: **[Lecture 04](./lectures/lecture04.html)** ([pdf](./lectures/lecture04.pdf) / [Rmd](./lectures/lecture04.Rmd))  
    * [Fort Collins shelter service data](https://opendata.fcgov.com/Neighborhood-Livability-and-Social-Health/Fort-Collins-Shelter-Service-Data/u8nn-nj59)  

<!-- end of list -->

### Homework

1. **Required Reading**  

    a. Wickham, H. (2014). Tidy data. Journal of Statistical Software, 59(10), 1-23. doi: [	10.18637/jss.v059.i10](https://www.jstatsoft.org/article/view/v059i10)  
    
        * "Informal and code heavy" version in the `tidyr` package vignette, available: https://cran.r-project.org/web/packages/tidyr/vignettes/tidy-data.html  

            <!-- end of list -->

    a. Tukey, J. W. (1977). Preface. In _Exploratory data analysis_ (pp. v-ix). Reading, MA: Addison-Wesley. Available: [here (pdf)](./resources/tukey1977preface.pdf)  

2. **[Assignment 2](./assignments/assignment2.html)** ([pdf](./assignments/assignment2.pdf) / [Rmd](./assignments/assignment2.Rmd)) (Due April 9)  

### Resources

**Data Wrangling**

* RStudio. Data wrangling with dplyr and tidyr cheat sheet. Available: https://www.rstudio.com/wp-content/uploads/2015/02/data-wrangling-cheatsheet.pdf

* Wickham, H., & Grolemund, G. Chapter 12: Tidy data. In _R for data science_. Available: https://r4ds.had.co.nz/tidy-data.html

* Navarro, D. Chapter 7: Pragmatic matters. In _Learning statistics with R_. Available: https://learningstatisticswithr.com/book/datahandling.html

* Chang, W. Converting data between wide and long format. In _Cookbook for R_. Available: http://www.cookbook-r.com/Manipulating_data/Converting_data_between_wide_and_long_format/

**Exploratory Data Analysis**

* Peng, R. D. Exploratory data analysis with R. Available: https://bookdown.org/rdpeng/exdata/

* Wickham, H., & Grolemund, G. Chapter 7: Exploratory data analysis. In _R for data science_. Available: https://r4ds.had.co.nz/exploratory-data-analysis.html

* Navarro, D. Chapter 5: Descriptive statistics. In _Learning statistics with R_. Available: https://learningstatisticswithr.com/book/descriptives.html

**Problems with Data**

* Navarro, D. Section 5.8: Handling missing values. In _Learning statistics with R_. Available: https://learningstatisticswithr.com/book/descriptives.html#missing

* van Buuren, S. Section 1.1: The problem of missing data, through Section 1.4: Multiple imputation in a nutshell. In _Flexible imputation of missing data_. Available: https://stefvanbuuren.name/fimd/sec-problem.html

* Prabhakaran, S. Outlier treatment. In _r-statistics.co_. Available: http://r-statistics.co/Outlier-Treatment-With-R.html

* Navarro, D. Section 2.7: Confounds, artifacts and other threats to validity. In _Learning statistics with R_. Available: https://learningstatisticswithr.com/book/studydesign.html#confounds-artifacts-and-other-threats-to-validity

* McDonald, J. H. Confounding variables. In _Handbook of biological statistics_. Available: http://www.biostathandbook.com/confounding.html


<br>


## Week 3: Information design and data visualization

### Lectures

* Tuesday, April 9: **[Lecture 05](./lectures/lecture05.html)** ([pdf](./lectures/lecture05.pdf) / [Rmd](./lectures/lecture05.Rmd))  
    * [Egg data](https://science.sciencemag.org/content/suppl/2017/06/21/356.6344.1249.DC1) (Excel format)  

<!-- end of list -->

* Thursday, April 11: **[Lecture 06](./lectures/lecture06.html)** ([pdf](./lectures/lecture06.pdf) / [Rmd](./lectures/lecture06.Rmd))  
    * [Egg data](./lectures/data/aaj1945_DataS1_Egg_shape_by_species_v2.csv) (CSV format)  

### Homework

1. **Required Reading**  

    a. Healy, K. Chapter 1: Look at data. In _Data visualization: A practical introduction_. Available: https://socviz.co/lookatdata.html
    
    a. Wilke, C. O. Chapter 29: Telling a story and making a point. In _Fundamentals of data visualization_. Available: https://serialmentor.com/dataviz/telling-a-story.html
    
1. **[Assignment 3](./assignments/assignment3.html)** ([pdf](./assignments/assignment3.pdf) / [Rmd](./assignments/assignment3.Rmd)) (Due April 16)

1. Start thinking about **[Project Proposal](./assignments/course_project.html)** (Due April 23, 11:59pm)

### Resources

* Wickham, H., et al. Create elegant data visualizations using the grammar of graphics: ggplot2. Available: https://ggplot2.tidyverse.org/

* Wickham, H., & Grolemund, G. Chapter 3: Data visualization. In _R for data science_. Available: https://r4ds.had.co.nz/data-visualisation.html

* Wickham, H., & Grolemund, G. Chapter 28: Graphics for communication. In _R for data science_. Available: https://r4ds.had.co.nz/graphics-for-communication.html

* RStudio. Data visualization with ggplot2 cheat sheet. Available: https://www.rstudio.com/wp-content/uploads/2015/12/ggplot2-cheatsheet.pdf

* Healy, K. Data visualization: A practical introduction. Available: https://socviz.co/

* Wilke, C. O. Fundamentals of data visualization. Available: https://serialmentor.com/dataviz/

* Rougier, N. P., et al. (2014). Ten simple rules for better figures. PLOS Computational Biology, 10(9), e1003833. doi: [10.1371/journal.pcbi.1003833](https://doi.org/10.1371/journal.pcbi.1003833)

* BBC Open Source. BBC visual and data journalism cookbook for R graphics. Available: https://bbc.github.io/rcookbook/

* The Urban Institute. Urban Institute R graphics guide. Available: https://urbaninstitute.github.io/urban_R_theme/

* Geckoboard. Play your charts right: Tips for effective data visualization. Available: https://www.geckoboard.com/learn/data-literacy/data-visualization-tips/

* Rost, L. C. (2018). Your friendly guide to colors in data visualisation. Chartable. Available: https://blog.datawrapper.de/colorguide/

* Tol, P. (2018). Colour schemes. SRON Netherlands Institute for Space Research. Available: https://personal.sron.nl/~pault/data/colourschemes.pdf


<br>


## Week 4: Hypothesis testing and basic linear models

### Lectures

* Tuesday, April 16: **[Lecture 07](./lectures/lecture07.html)** ([pdf](./lectures/lecture07.pdf) / [Rmd](./lectures/lecture07.Rmd))  
    * [PanTHERIA data](http://esapubs.org/archive/ecol/E090/184/) ("WR05")  

<!-- end of list -->

* Thursday, April 18: **[Lecture 08](./lectures/lecture08.html)** ([pdf](./lectures/lecture08.pdf) / [Rmd](./lectures/lecture08.Rmd))  
    * [Sage-Grouse data](https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0150798#sec020) ("S5 Table")  

### Homework

1. **Required Reading**  

    a. McDonald, J. H. Basic concepts of hypothesis testing. In _Handbook of biological statistics_. Available: http://www.biostathandbook.com/hypothesistesting.html
    
    a. McDonald, J. H. Correlation and linear regression. In _Handbook of biological statistics_. Available: http://www.biostathandbook.com/linearregression.html
    
        * For information on conducting these tests in R, see: Mangiafico, S. S. Correlation and linear regression. In _An R companion for the handbook of biological statistics_. Available: http://rcompanion.org/rcompanion/e_01.html

            <!-- end of list -->

    a. Joselson, N. (2016). Eugenics and statistics, discussing Karl Pearson and R. A. Fisher. Available: https://njoselson.github.io/Fisher-Pearson/

2. **[Assignment 4](./assignments/assignment4.html)** ([pdf](./assignments/assignment4.pdf) / [Rmd](./assignments/assignment4.Rmd)) (Due April 23)

3. **[Project Proposal](./assignments/course_project.html)** (Due April 23, 11:59pm)

### Resources

**Hypothesis Testing**

* McDonald, J. H. Choosing a statistical test. In _Handbook of biological statistics_. Available: http://www.biostathandbook.com/testchoice.html

    * For information on conducting these tests in R, see: Mangiafico, S. S. An R companion for the handbook of biological statistics. Available: http://rcompanion.org/rcompanion/

        <!-- end of list -->
    
* Navarro, D. Chapter 11: Hypothesis testing. In _Learning statistics with R_. Available: https://learningstatisticswithr.com/book/hypothesistesting.html

**Linear Models**

* Wickham, H., & Grolemund, G. Chapter 23: Model basics. In _R for data science_. Available: https://r4ds.had.co.nz/model-basics.html

* Wickham, H., & Grolemund, G. Chapter 24: Model building. In _R for data science_. Available: https://r4ds.had.co.nz/model-building.html

* McDonald, J. H. Simple logistic regression. In _Handbook of biological statistics_. Available: http://www.biostathandbook.com/simplelogistic.html

* McDonald, J. H. Multiple logistic regression. In _Handbook of biological statistics_. Available: http://www.biostathandbook.com/multiplelogistic.html

* Navarro, D. Chapter 15: Linear regression. In _Learning statistics with R_. Available: https://learningstatisticswithr.com/book/regression.html

* McDonald, J. H. One-way anova. In _Handbook of biological statistics_. Available: http://www.biostathandbook.com/onewayanova.html

* McDonald, J. H. Two-way anova. In _Handbook of biological statistics_. Available: http://www.biostathandbook.com/twowayanova.html

* Navarro, D. Chapter 14: Comparing several means (one-way ANOVA). In _Learning statistics with R_. Available: https://learningstatisticswithr.com/book/anova.html

* Navarro, D. Chapter 16: Factorial ANOVA. In _Learning statistics with R_. Available: https://learningstatisticswithr.com/book/anova2.html

* McDonald, J. H. Multiple comparisons. In _Handbook of biological statistics_. Available: http://www.biostathandbook.com/multiplecomparisons.html

* Faraway, J. J. Practical regression and anova using R. Available: https://cran.r-project.org/doc/contrib/Faraway-PRA.pdf

* Scholer, F. ANOVA - Type I/II/III SS explained. Available: https://mcfromnz.wordpress.com/2011/03/02/anova-type-iiiiii-ss-explained/

**Meta-Science**

* Aschwanden, C. (2015). Science isn't broken. FiveThirtyEight. Available: https://fivethirtyeight.com/features/science-isnt-broken/

* Angwin, J., et al. (2016). Machine bias. ProPublica. Available: https://www.propublica.org/article/machine-bias-risk-assessments-in-criminal-sentencing

* Lum, K., & Isaac, W. (2016). To predict and serve?. Significance, 13(5), 14-19. doi: [10.1111/j.1740-9713.2016.00960.x](https://rss.onlinelibrary.wiley.com/doi/full/10.1111/j.1740-9713.2016.00960.x)

* Rodriguez-Lonebear, D. (2016). Chapter 14: Building a data revolution in Indian country. In Kukutai, T., & Taylor, J. (Eds.), _Indigenous data sovereignty_ (pp. 253-272). Available: http://press-files.anu.edu.au/downloads/press/n2140/pdf/ch14.pdf


<br>


## Week 5: Advanced statistical methods, part I: Ecological analyses, ordinal data, and dimensionality reduction

### Lectures

* Tuesday, April 23: **[Lecture 09](./lectures/lecture09.html)** ([pdf](./lectures/lecture09.pdf) / [Rmd](./lectures/lecture09.Rmd))  
    * [Christmas Bird Count data](http://netapp.audubon.org/CBCObservation/Historical/ResultsByCount.aspx) (Fort Collins, 1900-2017)  
    * [Bob Marshall Wilderness Complex visitor data](https://www.fs.usda.gov/rds/archive/Product/RDS-2017-0016)  

<!-- end of list -->

* Thursday, April 25: **[Lecture 10](./lectures/lecture10.html)** ([pdf](./lectures/lecture10.pdf) / [Rmd](./lectures/lecture10.Rmd))  
    * ["Best" maximally complete Christmas Bird Count data](./lectures/data/fcbirdbest.csv)  

### Homework

1. **Required Reading**  

    None  

2. **[Assignment 5](./assignments/assignment5.html)** ([pdf](./assignments/assignment5.pdf) / [Rmd](./assignments/assignment5.Rmd)) **(ATTENTION: Due May 7)**

### Resources

**Ecological Analyses**

* Simpson, G. CRAN Task View: Analysis of Ecological and Environmental Data. Available: https://cran.r-project.org/web/views/Environmetrics.html  

* Oksanen, J. Vegan: An introduction to ordination. Available: https://cran.r-project.org/web/packages/vegan/vignettes/intro-vegan.pdf  

* Guevara, M. R., et al. (2016). `diverse`: An R Package to analyze diversity in complex systems. The R Journal, 8(2), 60-78. doi: [10.32614/rj-2016-033](https://journal.r-project.org/archive/2016/RJ-2016-033/RJ-2016-033.pdf)  

**Ordinal Data**

* Mangiafico, S. S. Introduction to Likert data. In _Summary and analysis of extension program evaluation in R_. Available: http://rcompanion.org/handbook/E_01.html  

* Barry, D. Do not use averages with Likert scale data. Available: https://bookdown.org/Rmadillo/likert/  

* Mangiafico, S. S. One-way permutation test of independence for ordinal data. In _Summary and analysis of extension program evaluation in R_. Available: http://rcompanion.org/handbook/K_02.html  

* Holgado–Tello, F. P., et al. (2010). Polychoric versus Pearson correlations in exploratory and confirmatory factor analysis of ordinal variables. Quality & Quantity, 44(1), 153. doi: [10.1007/s11135-008-9190-y](https://doi.org/10.1007/s11135-008-9190-y)  

* Rhemtulla, M., et al. (2012). When can categorical variables be treated as continuous? A comparison of robust continuous and categorical SEM estimation methods under suboptimal conditions. Psychological Methods, 17(3), 354. doi: [10.1037/a0029315](https://doi.org/10.1037/a0029315)  

**Dimensionality Reduction**

Multidimensional Scaling (Classical and Nonmetric)

* Boehmke, B. Hierarchical cluster analysis. In _University of Cincinnati Business Analytics R programming guide_. Available: https://uc-r.github.io/hc_clustering  

* Boehmke, B. Principal components analysis. In _University of Cincinnati Business Analytics R programming guide_. Available: https://uc-r.github.io/pca  

* Boehmke, B. K-means cluster analysis. In _University of Cincinnati Business Analytics R programming guide_. Available: https://uc-r.github.io/kmeans_clustering  

* Revelle, W. (2018). How to: Use the `psych` package for factor analysis and data reduction. Available: http://personality-project.org/r/psych/HowTo/factor.pdf  

* Savalei, V. (2011). What to do about zero frequency cells when estimating polychoric correlations. Structural Equation Modeling, 18(2), 253-273. doi: [10.1080/10705511.2011.557339](https://doi.org/10.1080/10705511.2011.557339)  

EFA


<br>


## Week 6: Advanced statistical methods, part II: Structural equation modeling, social network analysis, and geospatial analyses

### Lectures

* Tuesday, April 30: **[Lecture 11](./lectures/lecture11.html)** ([pdf](./lectures/lecture11.pdf) / [Rmd](./lectures/lecture11.Rmd))  
    * [Nerdy Personality Attributes Scale](https://openpsychometrics.org/_rawdata/) ("12/16/2018"", NPAS-data-16December2018.zip)  
    * [Northern Alaskan community helping network](https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0204343#sec016) ("S1 File")  

<!-- end of list -->

* Thursday, May 2: **[Lecture 12](./lectures/lecture12.html)** ([pdf](./lectures/lecture12.pdf) / [Rmd](./lectures/lecture12.Rmd))  
    * [Ancestral Pueblo food web network](https://www.sciencedirect.com/science/article/pii/S0305440317300377#appsec1) (Supplementary data spreadsheet) ([available here](./lectures/data/1-s2.0-S0305440317300377-mmc1.xlsx))  
    * [Ethiopian plant occurrence data](https://www.gbif.org/occurrence/search?country=ET&has_coordinate=true&has_geospatial_issue=false&taxon_key=6)  

### Homework

1. **Required Reading**  

    None  

2. **[Assignment 5](./assignments/assignment5.html)** ([pdf](./assignments/assignment5.pdf) / [Rmd](./assignments/assignment5.Rmd)) **(ATTENTION: Due May 14)**  

3. Start working on **[Project Report](./assignments/course_project.html)** (Due May 17, 11:59pm)  

4. Start working on **[Project Presentation](./assignments/course_project.html)** (Due week of May 13)  

### Resources

**Structural Equation Modeling**

Confirmatory Factor Analysis

* Rosseel, Y. lavaan: Tutorial. Available: http://lavaan.ugent.be/tutorial/index.html  

* Hartman, R. lavaan: A CFA example. Available: http://www.understandingdata.net/2017/03/22/cfa-in-lavaan/  

* Hartman, R. lavaan: A SEM example. Available: http://lavaan.ugent.be/tutorial/sem.html  

* Hartman, R. lavaan: Estimators and more. Available: http://lavaan.ugent.be/tutorial/est.html  

**Social Network Analysis**

* Getting started with R igraph. Available: https://igraph.org/r/

* https://kateto.net/netscix2016.html

**Geospatial Mapping**

* Bivand, R. CRAN Task View: Analysis of Spatial Data. Available: https://cran.r-project.org/web/views/Spatial.html  

Mantel Tests?

* Grossenbacher, T. Beautiful thematic maps with ggplot2 (only). Avalable: https://timogrossenbacher.ch/2016/12/beautiful-thematic-maps-with-ggplot2-only/

* https://www.shanelynn.ie/massive-geocoding-with-r-and-google-maps/

tidygraph?

ggraph?


<br>


## Week 7: Additional topics and workshops for course project

### Lectures

* Tuesday, May 7: Workshop

* Thursday, May 9: Workshop

### Homework

1. **Required Reading**  

    None  

2. **[Assignment 5](./assignments/assignment5.html)** ([pdf](./assignments/assignment5.pdf) / [Rmd](./assignments/assignment5.Rmd)) **(ATTENTION: Due May 14)**  

3. **[Project Report](./assignments/course_project.html)** (Due May 17, 11:59pm)  

4. **[Project Presentation](./assignments/course_project.html)** (Due week of May 13)  

### Resources

**Data Science**

* Gatto, L. An introduction to machine learning with R. Available: https://lgatto.github.io/IntroMachineLearningWithR/

Random Forests

Text Mining, Scraping, and Sentiment Analysis

**Reproducible Research**

* rOpenSci. Reproducibility in science. Available: https://ropensci.github.io/reproducibility-guide/

* Hartgerink, C. (2017). Composing reproducible manuscripts using R Markdown. Available: https://elifesciences.org/labs/cad57bcf/composing-reproducible-manuscripts-using-r-markdown

* Lowndes, J. S. S., et al. (2017). Our path to better science in less time using open data science tools. Nature Ecology & Evolution, 1(6), 0160. doi: [10.1038/s41559-017-0160](https://doi.org/10.1038/s41559-017-0160)

**Science Communication**

* Hillier, A., Kelly, R. P., & Klinger, T. (2016). Narrative style influences citation frequency in climate change science. PLOS ONE, 11(12), e0167983. doi: [10.1371/journal.pone.0167983](https://doi.org/10.1371/journal.pone.0167983)

* Ratliff, W. The David Attenborough style of scientific presentation. Available: https://www.dropbox.com/s/j1vv2baheiduvip/David%20Attenborough%20talk%20technique%202018.pdf


<br>


## Week 8: Project presentations

* Tuesday, May 14: 12:00pm - 1:00pm, Michael Smith Natural Resources Building (MSNR) 142   


<br><br>


([pdf](./schedule_spring2019.pdf) / [Rmd](./schedule_spring2019.Rmd))

<div class="tocify-extend-page" data-unique="tocify-extend-page" style="height: 0;"></div>