Analyzing Grouped Data

In this unit, you will learn classical statistical tests and how to compare means between groups.

Follow the links to each lecture, lab, and reading.

Scroll down to download the SWIRL lessons.

Lesson 1. How to choose a statistical test

Lectures:

Which test? Which assumptions?

Formulae

Learning Goals:

SWIRL: Testing assumptions and exploring data

Lab: Unit 3: Lab 1

Readings:

Zuur et al. 2010. A protocol for data exploration to avoid common statistical problems. Methods in Ecology & Evolution 1, 3–14.

Läärä, E. 2009. Statistics: reasoning on uncertainty, and the insignificance of testing null. Ann. Zool. Fennici 46: 138–157.

Functions: qqplot(), ks.test(), shapiro.test(), bartlett.test()

Lesson 2. How to compare counts between groups

Lecture: Testing ratios and tabulating data

Learning Goals:

SWIRL: Testing Ratios

Lab: Unit 3: Lab 2

Reading:

Functions: table(), prop.test(), binom.test(), chisq.test()

Lesson 3. How to calculate group-level stats in dataframes

Lecture: The Split-Apply-Combine approach

Learning Goals:

SWIRL: The *apply() group of functions:

Lab: Unit 3: Lab 3

Reading: Wickham, H. 2001. The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software 40.

Functions: apply(), tapply(), sapply(), lapply()

Lesson 4. How to compare means from different groups or populations

Lecture: t-tests and ANOVAS

Best Practice: Writing

Learning Goals:

SWIRL: Testing Populations

Lab: Unit 3: Recap

Reading:

Functions: t.test(), aov(),


Updated: 2018-10-01