Important update (fall 2020)

During the fall of 2020 (and possible onwards) this course will be given online with course information available through the Studium platform. 

About the Course


  • Lars Lindhagen: course responsibility, main lecturer
  • Henrik Renlund: lecturer
  • Katja Gabrysch: computer exercises
  • Tatevik Lakic: computer exercises
  • Ollie Östlund: guest lecturer (clinical trials)
  • Liisa Byberg: guest lecturer (epidemiology)


 (Not available)


Exam problems and data for problems 1-5 will be emailed to course participants. Contact Lars Lindhagen if you need another copy. 

Statistical Software

You are free to use whatever software you like for this course. The computer lab we will use has R, SPSS, Statistica and Minitab installed. If you have a laptop with some other software you are of course free to bring that to the exercises.

We recommend using R via 'R Commander'. 

Installing R and R Commander

Begin by installing R. R's homepage can be found at www.r-project.org. From there you can follow directions but you probably want to download R from a Swedish server and (assuming you are a windows user) go via: Download R for Windows : base : Download R 3.5.1. for Windows (version number may have been updated). If you are not an administrator on your computer you might want to change the target directory during the installation, see the next section.

(In previous courses Mac users have reported getting an error message when starting R, but in all these cases they have been able to run R anyway.)

When R is installed you start it and type


to install R Commander. When installed, you start it via


(this last code has to be written every time you want to start R Commander).

Not an administrator?

If you are not an administrator on your computer, you may have trouble installing packages. This can be due to the fact that you do not have writing access to the folder (the "library") which is the default location for packages (on Windows this might be somewhere under "C:/Programs/").

The simplest solution is to change the target directory during the R installation process (e.g. to "C:/R/R-3.5.1" or similar). Then you probably will have writing access and no further changes should be needed.

Another solution is to create a separate library folder, e.g. "C:/Users/your-username/R-library/", and to tell R to look there by executing


in R. R might not remember this library path across sessions, but it is possible to put line of code in a file named ".Rprofile" that should be placed in your home directory. From R you can execute


if you do not know your home directory. The .Rprofile file will be executed when R is started.

Computer exercises

  • (Computer Excercises with Rcmdr - not available)
  • (Data sets - not available)

These exercises are tailored for R via R Commander (installation instructions above).