# Psychology 9041b: Introduction to Statistics Using R

## 1 Course Information

Psychology 9041b: Introduction to Statistics Using R

## 2 Instructor Information

- Professor Paul Gribble
- paul@gribblelab.org
- (519) 661-2111 x86185
- Office: WIRB 4122

## 3 Course Description

### Goals

The goal of this one-semester graduate seminar is to provide you with a deeper understanding of the logic behind statistical analyses of data, to learn a set of standard statistical techniques, and to gain hands-on experience using the R language for statistical computing and graphical displays of data.

You may have covered some of these topics before in previous courses. Even so, you will benefit from covering the same ground, in a different way, using the model comparison approach. You will also learn to use R.

### Class Times and Location

We will meet twice a week, in WIRB 1130:

- Lectures: Tuesdays from 2:00 pm to 3:30 pm
- Labs: Thursdays from 1:30 pm to 3:00 pm

### Potential Topics

- Probability
- Logic of hypothesis testing & the t-test
- One-way between-subjects ANOVA
- Multiple comparisons & corrections for Type-I error
- Statistical Power & effect size
- Two-factor/three-factor between subjects ANOVA
- Repeated measures ANOVA
- Split-plot ANOVA
- ANCOVA
- Multiple Regression
- Principle Components Analysis (PCA)
- Bootstrapping & Resampling Methods
- Maximum Likelihood Estimation
- Programming & Data Wrangling in R
- Making Graphics in R
- Writing Documents/Papers using R Markdown

One important thing to realize: We will not have enough time in the classes to go over the details of every concept covered in the course. In class I will highlight the major ideas and provide a conceptual roadmap for you to navigate through the material. You will be responsible for reading the material in the textbooks on your own and asking questions if you need more guidance. Just because I didn't say it out loud in class doesn't mean you're not responsible for it. Pay attention to the readings assigned for each week and do them in advance of class, not afterwards.

There is no doubt, there is a lot of reading assigned in this course. Remember, you are a full time graduate student, your full time job is to learn. Do the readings, they are a requirement of the course.

This is not a course on "how to use R" or a course on "data wrangling/graphing with R". We won't be using the "tidyverse". If you are interested in learning about these topics, I've listed a number of good resources for that, below.

### Prerequisites

There are no formal prerequisites for the course. As a result I expect students in the class to have varying levels of previous experience with statistics and with statistical programming in R or another language. The typical student will have had one or more courses in statistics and probability, for example in an Honours Psychology undergraduate degree program or equivalent. While you may have had formal instruction in some of the topics listed below already, you may not have used a statistical programming language such as R to implement these procedures, and you may not have covered these topics using the model comparison approach that we will use, based on the Maxwell & Delaney text.

If you have never taken a course in statistics or probability then you may still take the course, but you will have more to learn on your own than students who have previous experience. Please keep this in mind.

## 4 Course Materials

The course website including a schedule of dates and topics, is the central location to find all information about the course, including a regularly updated schedule of classes and topics:

### Mandatory Textbook

- Designing Experiments and Analysing Data: A Model Comparison Perspective (3rd Edition) by Scott E. Maxwell, Harold D. Delaney and Ken Kelley. Routledge (2017). ISBN: 978-1138892286

The textbook is available at the campus bookstore (they are charging $200). You can also buy it from Amazon.ca at a significant discount, in both hardcover ($152) and Kindle ($72) format, or directly from the publisher for an even deeper discount ($100 hardcover, $49 eBook).

### Textbook Website

There is a website accompanying the textbook with datasets from the book, and sample R code for many of the chapters.

### R package

There is a package for R on the CRAN site that contains datasets from the Maxwell & Delaney text:

### Other Recommended Books

- Design and Analysis: A Researcher's Handbook (4th Ed.) by Geoffrey Keppel. Prentice Hall (2004)
- A Beginner's Guide to R by Zuur, Ieno & Meesters. Springer (2009)

Other selected readings will be assigned as appropriate for the topic each week.

### Resources for more advanced R instruction

- R for Data Science by Hadley Wickham & Garrett Grolemund. O'Reilly (2017)
- stat545 course at UBC

### Software

R is a sophisticated package for graphical and exploratory data analysis, and is a powerful statistical programming language. R can be downloaded for free for Windows, Macintosh, Linux, and Unix operating systems from https://www.r-project.org. The R manual is also available for free on the web. R code is platform-independent. R has extensive on-line help, and there are lots of other resources on-line for using R.

RStudio is a free and open-source integrated development environment (IDE) for R. You can download it from https://www.rstudio.com. I recommend you use it, although if you prefer you can use the plain R client above.

I recommend that you bring a laptop to class, so that you can try things out in R as we go.

## 5 Methods of Evaluation

- 70% Weekly Assignmnets
- 15% Midterm Exam (take-home exam)
- 15% Final Exam (take-home exam)

## 6 Statement on Academic Offences

Scholastic offences are taken seriously and students are directed to read the appropriate policy, specifically, the definition of what constitutes a Scholastic Offence, at the following Web site:

http://www.uwo.ca/univsec/pdf/academic_policies/appeals/scholastic_discipline_grad.pdf

All required papers may be subject to submission for textual similarity review to the commercial plagiarism-detection software under license to the University for the detection of plagiarism. All papers submitted for such checking will be included as source documents in the reference database for the purpose of detecting plagiarism of papers subsequently submitted to the system. Use of the service is subject to the licensing agreement, currently between The University of Western Ontario and Turnitin.com (http://www.turnitin.com).

Computer-marked multiple-choice tests and/or exams may be subject to submission for similarity review by software that will check for unusual coincidences in answer patterns that may indicate cheating.