ECPR Winter School
University of Bamberg, Bamberg
2 - 9 March 2018




WA106(B) - Introduction to R (for participants with some prior knowledge in command-line programming)

Instructor Details

Instructor Photo

Florian Weiler

Institution:
University of Bamberg

Instructor Bio

Florian is a Lecturer in Quantitative Politics at the Universtiy of Kent, where he teaches both statistics and content courses. Before joining the University of Kent he worked as a post-doctoral researcher at the University of Bamberg, and he earned his doctoral degree at ETH Zurich. His main research interests are in the fields of environmental politics and interest group research.


Course Dates and Times
Friday 2 March
13:00-15:00 and 15:30-17:00

Saturday 3 March
11:00-12:00 / 13:00-14:30 and 15:00-16:30
Prerequisite Knowledge

Some basic knowledge of R, or any other command-line programming language (such as Stata, SPSS, etc.) is required for this course. If you do not possess this knowledge, the Winter School offers another introductory R course for absolute beginners (WA 105(A) taught be Thorsten Schnapp). The two courses are essentially the same. Both start with the absolute basics, but in this course we will progress faster and cover more ground.

Short Outline

This course introduces students to many of the most commonly used features of R, a powerful and very versatile statistical computing environment. At the beginning of the course, we will learn what R is and how it works, how data can be read into R, and how these data can be accessed and manipulated. Next we will cover various ways to summarize and tabulate the data, and how to use them for statistical inference. We will also learn how to use some of the very powerful plotting tools of R. At the end of the course, students should be able to use R with some confidence.

Long Course Outline

R is a very powerful and versatile computing environment, and is widely used by statisticians, economists, political scientists, etc. R is developed by its users, and researchers from many different fields have contributed to making R into the powerful statistical program it is today. What this means it that user can write their own R code, or adjust existing code according to their needs, and share this code with others. But this also means that there are a vast number of statistical tools and methods implemented in R, and we will only be able to scratch the surface of R’s vast potential in this short introductory course. However, the goal is to provide students with enough knowledge of how R works so they can learn new techniques themselves and/or follow other courses taught in R.

In the first session, we will cover how R works and which tools are available to facilitate working with R (in particular we will use RStudio). Then we will learn about objects in R, how they (or a subset of their elements) can be accessed and manipulated, and how they can be transformed into datasets for further analysis. In addition, reading in data from other data formats (such as SPSS and STATA) will be covered, as well as how to save data. Once we are familiar with data generation and data access, we will learn how to merge different datasets, and how to bring them into the desired data format.

In the second session we will start analysing the data, first using simple summary commands and descriptive statistics, but also through the use of various tabulating tools available in R. Then we will cover how to implement regression analysis in R, and how to access various elements of our statistical models for further analysis. In addition, in this section we will cover data transformation and how to deal with special values in R.

In the final session we will talk about the very powerful graphic tools provided by R. On the one hand we will use the basic plot function that comes with the standard R distribution, but we will also talk about other graphics packages such as lattice and ggplot2. Finally, we will briefly talk about writing our own simple functions in R.

At the end of the course students should be confident users of the basic functions of R. They should also know how to get help, and thus how to learn techniques not covered in the course themselves. At the least students should be able to participate in and follow other courses taught during the Winter School which require R as a prerequisite.

Day-to-Day Schedule

Day 
Topic 
Details 
Friday AfternoonR and RStudio, accessing and manipulating data, merging and reshaping data

The lecture will be intertwined with hands-on exercises for students

Saturday MorningData analysis, summary statistics, tables, regression analysis, data transformation, missing values

The lecture will be intertwined with hands-on exercises for students

Satruday AfternoonGraphics in R (in particular plot and lattice), simple functions

The lecture will be intertwined with hands-on exercises for students

Day-to-Day Reading List

Day 
Readings 
 

Appropriate PDFs will be provided for each session.

Friday afternoon

Required: Chapters 1 and 2

Saturday morning

Required: Chapters 3 and 4

Saturday afternoon

Required: Chapters 6 and 7

 

All the required readings are from Fox, John, & Sanford Weisberg (2011): An R Companion to Applied Regression.2nd edition, Thousand Oaks: Sage Publications, Inc.

Software Requirements

If students want to use their own computer or we’re not able to be in a computer lab, you should download R Version 3.2.0 or higher from http://www.r-project.org/ (License: GPL 2). In addition, we recommend downloading RStudio from https://www.rstudio.com/products/rstudio/download/ (License: AGPL v3).

If we need additional R packages, further information will follow regarding these free-of-charge packages, when the online course area will be available.

Hardware Requirements

Any fairly modern computer able to run R should be good enough for this course. Students will need an internet connection if they use their own laptops, as we will need to download R packages during the course. If you are unfamiliar with the German power supply: we have 230 volts and 50 hertz, and the sockets typically accept Schuko (CEE 7/4) or Europlug (CEE 7/16).

Literature


Fox, John, & Sanford Weisberg (2011): An R Companion to Applied Regression. 2nd edition, Thousand Oaks: Sage Publications, Inc

Kleiber C, Zeileis A (2008): Applied econometrics with R, New York: Springer

Zuur, Alain, Elena Ieno, & Erik Meesters (2009): A Beginner’s Guide to R. Dordrecht, Heidelberg, London, New York: Springer

Kabacoff, Robert (2011): R in Action. Greenwich, CT: Manning Publications.

Additional Information

Disclaimer

The information contained in this course description form may be subject to subsequent adaptations (e.g. taking into account new developments in the field, specific participant demands, group size etc.). Registered participants will be informed in due time in case of adaptations.

Note from the Academic Convenors

By registering to this course, you certify that you possess the prerequisite knowledge that is requested to be able to follow this course. The instructor will not teach these prerequisite items. If you are not sure if you possess this knowledge to a sufficient level, we suggest you contact the instructor before you proceed with your registration.


Share this page
 

"In all forms of Government the people is the true Legislator" - Edmund Burke


Back to top