Course meeting time: Wednesdays, 14:15 - 15:45, Missionsstrasse 64a, Computerraum 00.010

Syllabus (you’re looking at it) webpage: http://rpubs.com/YaRrr/syllabus_Winter2016

Instructor: Nathaniel Phillips, nathaniel.phillips@unibas.ch

Office Hours: By appointment (or just stop by my office at Missionsstrasse 62A)

Schedule and assignments

Your homework for each class period is to actively read the readings for that week. The videos are optional. You don’t need to turn in anything from the readings. All of the work you turn in will be done in class as WPAs (Weekly Programming Assignments).

To download the homework, right-click the link and save as! To open the videos, right-click and open in a new tab.

Week Date Topic Reading (home) Videos (bathroom) WPA (class)
1 Sep 28 Introduction None - WPA #0
2 Oct 5 R basics, scalers and vectors Ch-1, Ch-2, Ch-3, Ch-4 A, B, C WPA #1Answerspdf
3 Oct 12 Indexing Vectors Ch-5 D WPA #2Answerspdf
4 Oct 19 Matrices and Dataframes, Managing data Ch-6, Ch-7 E, F WPA #3Answerspdf
5 Oct 26 Dataframe manipulation Ch-8 G WPA #4Answerspdf
6 Nov 2 Plotting Ch-9, Ch-10, IDRE ggplot2 Intro BasePlotting, ggplot2-A, ggplot2-B , ggplot2-C WPA #5Answerspdf
7 Nov 9 1 and 2 sample Hypothesis tests Ch-11 t-test WPA #6Answerspdf
8 Nov 16 ANOVA with aov() and anova() Ch-12 ANOVA in R, ANOVA Calculations WPA #7Answerspdf
9 Nov 23 Linear regression with lm(), glm() Ch-13 - WPA #8 - Answerspdf
10 Nov 30 Writing Functions and Loops Ch-15, Ch-16 Loops, Custom Functions WPA #9 - Answerspdf
11 Dec 7 R Markdown and papaja Markdown Guide, Papaja Guide - WPA #10 - Answers: RMD file, Answers: bib file
12 Dec 14 Final project work - - -
13 Dec 21 Final project work - - -
End Dec 23 Final Project Due!!! Final Paper Description - - -

Course Description

R is one of the most popular statistical languages for both academic researchers and data analysts working in industry. The reason why is simple - R is free, easy to use and incredibly powerful. With R you can generate and manipulate data, conduct analyses, create plots and even write documents. The goal of this course is to introduce you to R so you can apply it to your current and future research. In this course, you will learn how to use R to conduct all steps of your data analysis, from loading data to performing analyses, to producing reports.

This course is for anyone who wants to learn R. I don’t care if you’re 10 or 100 or what your background is in programming, math, or pirate history. If you want to learn R and know how to use a computer, this course is for you. That said, the course is designed around the needs of a psychology student in a Bachelor’s, Masters, or PhD program who has taken at least an introductory course in statistics.

This is not a traditional course…

This is not a traditional course – this is a ‘flipped’ course. This means that you will be learning the basic material on your own time outside of class, and then ‘learn-by-doing’ in class. To learn the basic material, you will read chapters from the e-book YaRrr! The Pirate’s Guide to R. Links to chapters to the book will be posted on the top of this page as the course progresses. In class, you will complete exercises (called “Weekly Programming Assignments” or WPAs for short) with the help of myself and your classmates. For more information about the ‘flipping’ concept, check out https://en.wikipedia.org/wiki/Flipped_classroom.

If you are interested in additional, non-piratey materials, there are numerous books and websites that can help you discover new ways of utilizing R. Two books I can recommend are Discovering Statistics Using R by Field and Miles and The R Book by Crawly. If you don’t like books, you can also find free R courses at www.coursera.com, www.datacamp.com, and other similar websites. As is the case with most problems, a quick Google search will likely provide good solutions.

Course rules

It should be noisy during class. A quiet class is typically a bored class that isn’t learning anything. A noisy class is a class that’s struggling, asking questions, and actually learning. If I find that the class is not noisy enough, I reserve the right to play Justin Bieber until the class gets noisy again. This is not an empty threat. While I expect the class to be noisy, mobile phones and non course related web-surfing are absolutely forbidden during the class period! If you’re not here to have fun and learn R with the rest of the class, don’t bother coming.

If you want to learn R, you have to do two things: work regularly, and get help. For these reasons, it is in your best interest to attend class. If you routinely miss class and/or do not turn in WPAs without a valid excuse, you won’t learn anything, and you may fail the class.

Weekly Programming Assignments (WPAs)

During each class you will work on a series of programming tasks called a Weekly Programming Assignment (WPA). Like the questions on Who Wants to be a Millionnaire?, the questions on WPAs will start easy to help remind you of the reading, but end hard in order to push your knowledge of the material. However, I do not expect you to finish the entire WPA by the end of class. Work hard, ask questions, and complete as many of the problems as you can. At the end of each class you will turn in whatever you completed. The only way to fail your assignment is to not turn it in. You are not expected to continue working on WPAs outside of class.

I encourage you to work with a partner (or two) on WPAs. However, it is very important that each student’s work is his/her own. Do not turn in any assignments that you did not contribute to or do not fully understand.

Complete answers to WPAs will be posted shortly after each class. I strongly encourage you to look over the answers when they are posted.

Final Project

At the end of the course you will complete a final analysis project. In this project, you will produce a report containing several key analyses from a dataset of your choosing. If you have a specific dataset you would like to analyze (such as from your thesis), you are welcome to use it. If not, I will assign one to you. I will give you more details about the project later in the course.

Grading

This is a pass / fail course. Passing the course is not difficult. If you work hard, ask lots of questions, turn in your WPAs and complete the final analysis project, you’ll pass the class. If you never ask questions, habitually fail to turn in your WPAs and turn in a poor quality final project, you may fail the course.