Skip to main navigation Skip to search Skip to main content

Statistical Programming in R and Python

Course

URL study guide

https://studiegids.vu.nl/en/courses/2026-2027/P_MSTPRR

Course Objective

The R program is an important tool in statistical analysis and programming. In the master program Genes in Health and Behavior (GHB), master students will be required to use R in GHB courses (e.g., Behavior Genetics) and in their internships. Looking beyond your present MA program, experience in using R is also a valuable addition to your C.V, as R is used geenrally both in and beyond academia. The aim of the present course is to teach to practical R skills, within the context of common statistical analyses and genetics. While the emphasis is on using R, the context is useful because it will refresh your statistical knowledge, and introduce you to some genetic concepts. Following this course, you will be able to do data management and data analyses in R. The course is organized around a workbook which consists of 6 chapters. The workbook is supposed to be self-contained, and suitable in principle for self-study. If a given R script involves a statistical model, that statistical model is explained in the workbook. For instance, we will use R code to demonstrate the meaning of type I and type II errors in statistical null-hypothesis testing. In the workbook these concepts are explained. The same applies to linear regression analysis, logistic regression analyses, odds ratios, etc. The R code is used in a statistical context, and an explanation of that context is included in the workbook. The procedure is as follows. Every week you will study the workbook, practice using the R code in the workbook, and you will do one or more workbook assignments. Returning the workbook assignments every week before the given deadline is a course requirement. Failing to return the workbook assignments on time detracts from your final grade. The final exam consists of a final assignment which you can do at home (i.e., a take home exam), and which you have to return before the given deadline. Canvas will include the facilities to confer during the course, to pose questions or to present problems. You will free to confer amongst yourselves via the Canvas facilities. This is desirable as it is likely that the prior knowledge and experience in using R in statistical analyses will vary greatly from student to student. The workbook and the course is designed to cater to students who have no experience with R, and possibly limited experiences with statistical analyses. For students, who are proficient at R, the course offers the means to refresh their statistical knowledge and practical R skills. The course covers 6 weeks, of which 4 are devoted to R and based on the course workbook, and the assignments. The last two weeks are devoted to an introduction to Python, which is a related programming language that is used extensively in the field of genetics. Python, like R, is an important tool in statistical analysis and programming. Python was developed as a programming language, rather than a statistical language. However, since its development a great number of extensions have been developed which have made Python a very popular programming language in bioinformatics. The more programming-oriented Python language has a far broader use case compared to R, which has also made it a very popular language for web applications, AI and machine learning, information security, and others making it the number 3 most popular programming language worldwide (according to TIOBE) since overtaking C++ in 2019. Syntactically the Python and R language are pretty similar, therefore the knowledge you acquire during the R part of the course is very valuable when learning Python. And adding Python to your list of skills is another valuable addition to your C.V. for jobs in many different fields. During the last two weeks of the course we will focus on translating what you have learned in R to Python, running very similar scripts in a different language and explaining the basic concepts, its usage, advantages and disadvantages of the Python language.

Course Content

The aim of this course is to provide an introduction to R and Python by hands-on statistical analyses and data management.

Teaching Methods

The R part of the course is organized around a workbook which consists of 6 chapters. The workbook is supposed to be self-contained, and suitable for self-study. If a given R script involves a statistical model, that statistical model is explained in the workbook. For instance, we will use R code to demonstrate the meaning of type I and type II errors in statistical null-hypothesis testing. In the workbook these concepts are explained. The same applies to linear regression analysis, logistic regression analyses, odds ratios, etc. The R code is used in a statistical context, and an explanation of that context is included in the workbook. The procedure is as follows. Every week you will study the workbook, practice using the R code in the workbook, and you will do one or more workbook assignments. Returning the workbook assignments every week before the designated deadline is a course requirement. Failing to return the workbook assignments on time detracts from your final grade. The final exam consists of a final assignment which you can do at home (i.e., a take home exam), and which you have to return before the designated deadline. The weekly (2 hour) lectures are devote mainly to the statistical aspects of the R use, not to R code it self. The R code is explained in the workbook. A canvas discussion group will be created so that students can communicate about the workbook content, including the R code and the exercises. The weekly assignments are individual assignments.

Method of Assessment

Examination consists of weekly assignments and a final takehome exam,

Literature

The literature consists of an R workbook comprising 6 chapters. This workbook includes example, exercises and assignments. R scripts are presented, explained and serve to illustrate or explain various statistical subjects. In addition to the workbook, there is a statistical refresher, which is optional reading for student, who require a stats refresher.

Target Audience

This is a MA level course, specifically for students who wish to learn about statistical analyses in R

Additional Information

To follow the course you require a desktop or laptop computer

Entry Requirements

With respect to prior knowledge, I assume that students have knowledge of basic statistics (normal distribution, mean, variance, standard deviation, linear regression, null hypothesis testing), and no prior experience in using R. Experience with other statistical programs such as SPSS is useful, but not necessary.

Recommended background knowledge

Students are expected to have followed basic stat courses in the past.

Explanation Canvas

A canvas page will include an explanation of the course, the workbook, and a discussion group
Academic year1/09/26 → 31/08/27
Course level6.00 EC

Language of Tuition

  • English

Study type

  • Master