Introduction to statistical methods with R

This page contains teaching material for introductory courses of statistics in R.


The links below lead to html notebooks. The slides are available upon request. The original Rmd files can be downloaded further hereafter.

  1. Introduction to the tidyverse: plotting, filtering, organising data.

  2. Basic R instructions: package installation, data generation, matrix & dataframe manipulation, loops and simple functions.

  3. Distributions: descriptive statistics, parametric distributions, plots, histograms, etc.

  4. Maximum likelihood estimation: moment matching versus the mle/mle2 functions.

  5. Monte-Carlo simulations: random number generation with sequential tournaments as examples + cool exercises.

  6. Time-series analysis: fitting autoregressive processes & predictions using French economic data.

  7. Bayesian inference: conjugate priors, grid approximation and a snapshot of Markov Chains (but no MCMC sadly).

  8. Statistical tests & regressions : one and two mean tests, basic regression analysis.

Supplementary material:

The original Rmd files (.zip) as well as the correction of exercises: data + html and Rmd format (.zip also).

R Memo: a compilation of everything you need to know (survival toolkit).

Example on financial data: exercises on 30 large US firms; data here.

Online tutorial: exercises & solutions on the core functions of the tidyverse.

Links: R on the web: a short list of links, sorted by themes.


ANES data: US political surveys (1990-2016) and in Excel form

French economic indicators

Financial data on 30 large US firms

You can download all files at once here.

DISCLAIMER: the data and code are meant for pedagogical use only.