Quick Overview

Column 1

Outline

R is rapidly becoming the standard platform for data manipulation, visualization and analysis and has a number of advantages over other statistical software packages. A wide community of users contribute to R, resulting in an enormous coverage of statistical procedures, including many that are not available in any other statistical program. Furthermore, it is highly flexible for programming and scripting purposes, for example when manipulating data or creating professional plots. However, R lacks standard GUI menus, as in SPSS for example, from which to choose what statistical test to perform or which graph to create. As a consequence, R is more challenging to master. Therefore, this course offers an elaborate introduction into statistical programming in R. Students learn to operate R, make plots, fit, assess and interpret a variety of basic statistical models and do advanced statistical programming and data manipulation. The topics in this course include regression models for linear, dichotomous, ordinal and multivariate data, statistical inference, statistical learning, bootstrapping and Monte Carlo simulation techniques.

The course deals with the following topics:

  1. An introduction to the R environment.
  2. Basic to advanced programming skills: data generation, manipulation, pipelines, summaries and plotting.
  3. Fitting statistical models: estimation, prediction and testing.
  4. Drawing statistical inference from data.
  5. Basic statistical learning techniques.
  6. Bootstrapping and Monte Carlo simulation.

The course starts at a very basic level and builds up gradually. At the end of the week, participants will master advanced programming skills with R. No previous experience with R is required.

Prerequisites: Participants are requested to bring their own laptop for lab meetings.

Certificate

Participants will receive a certificate at the end of the course.

Column 2

Daily schedule

When? What?
09.00 09.30 Lecture
09:30 10.15 Practical
10.15 10.45 Discussion
break
11.00 11.45 Lecture
11:45 12.30 Practical
Lunch
14:00 14.30 Discussion
14:30 15:30 Lecture
break
15:45 16.30 Practical
16:30 17:00 Discussion

Lecture Hall locations

When? Where
Tuesday Ruppert Blauw
Wednesday Koningsberger Cosmos
Thursday Ruppert 040
Friday Koningsberger Cosmos

How to prepare

Column 1

Preparing your machine for the course

Dear all,

This summer you will participate in the USS24: Statistical programming with R course in Utrecht, the Netherlands. To realize a steeper learning curve, we will use some functionality that is not part of the base installation for R. The below steps guide you through installing both R as well as the necessary additions.

If you follow this course online; please have a look at this instructional page on MS Teams

We look forward to see you all in Utrecht and online,

The Statistical Programming with R Team

System requirements

Bring a laptop computer to the course and make sure that you have full write access and administrator rights to the machine. We will explore programming and compiling in this course. This means that you need full access to your machine. Some corporate laptops come with limited access for their users, we therefore advice you to bring a personal laptop computer, if you have one.

1. Install the latest version of R

R can be obtained here. We won’t use R directly in the course, but rather call R through RStudio. Therefore it needs to be installed.

2. Install the latest RStudio Desktop

Rstudio is an Integrated Development Environment (IDE). It can be obtained as stand-alone software here. The free and open source RStudio Desktop version is sufficient.

3. Start RStudio and install the following packages.

Execute the following lines of code in the console window:

install.packages(c("ggplot2", "tidyverse", "magrittr", "knitr", "rmarkdown", 
                   "plotly", "ggplot2", "shiny", "devtools", "boot", "class", 
                   "car", "MASS", "ggplot2movies", "ISLR", "DAAG", "mice", 
                   "purrr", "furrr", "future"), dependencies = TRUE)

If you are not sure where to execute code, use the following figure to identify the console - ignore the outdated version in the example:

HTML5 Icon

Just copy and paste the installation command and press the return key. When asked

Do you want to install from sources the package which needs 
compilation? (Yes/no/cancel)

type Yes in the console and press the return key.

Column 2

What if the steps to the left do not work for me?

If all fails and you have insufficient rights to your machine, the following web-based service will offer a solution.

  1. You will receive an account to Utrecht University’s MyWorkPlace. You would have access to R and RStudio there. You may need to install packages for new sessions during the course.
  2. Open a free account on rstudio.cloud. You can run your own cloud-based RStudio environment there.

Naturally, you will need internet access for these services to be accessed. Wireless internet access will be available at the course location.

Monday

Column 1

Monday’s materials

We adapt the course as we go. To ensure that you work with the latest iteration of the course materials, we advice all course participants to access the materials online.

All lectures are in html format. Practicals are walkthrough files that guide you through the exercises. Impractical files contain the exercises, without walkthrough, explanations and solutions.

Column 2

Useful references

The above links are useful references that connect to today’s materials.

Tuesday

Column 1

Tuesday’s materials

We adapt the course as we go. To ensure that you work with the latest iteration of the course materials, we advice all course participants to access the materials online.

All lectures are in html format. Practicals are walkthrough files that guide you through the exercises. Impractical files contain the exercises, without walkthrough, explanations and solutions.

Column 2

Useful References

The above links are useful references that connect to today’s materials.

Wednesday

Column 1

Wednesday’s materials

We adapt the course as we go. To ensure that you work with the latest iteration of the course materials, we advice all course participants to access the materials online.

All lectures are in html format. Practicals are walkthrough files that guide you through the exercises. Impractical files contain the exercises, without walkthrough, explanations and solutions.

Column 2

Releveling

library(mice)
library(magrittr)
boys %$% lm(age ~ reg) %>% coef()
(Intercept)     regeast     regwest    regsouth     regcity 
  11.898420   -2.656786   -2.900792   -3.307388   -3.626625 
boys$reg <- relevel(boys$reg, ref = "south")
boys %$% lm(age ~ reg) %>% coef()
(Intercept)    regnorth     regeast     regwest     regcity 
  8.5910314   3.3073883   0.6506021   0.4065962  -0.3192369 

Thursday

Column 1

Thursday’s materials

We adapt the course as we go. To ensure that you work with the latest iteration of the course materials, we advice all course participants to access the materials online.

All lectures are in html format. Practicals are walkthrough files that guide you through the exercises. Impractical files contain the exercises, without walkthrough, explanations and solutions.

Friday

Column 1

Friday’s materials

We adapt the course as we go. To ensure that you work with the latest iteration of the course materials, we advice all course participants to access the materials online.

All lectures are in html format. Practicals are walkthrough files that guide you through the exercises. Impractical files contain the exercises, without walkthrough, explanations and solutions.

To continue

Column 1

What to do after the course

The above references are (currently) available for free in these links. I deem them very useful and I would highly recommend them.

Column 2

For fun