Bookdown contest submission: Introduction to Econometrics with R

Introduction to Econometrics with R is best described as an interactive companion to the well-received textbook Introduction to Econometrics (Stock & Watson, 2015) which serves as a basis for the undergraduate courses in Econometrics we teach at the University of Duisburg-Essen, Germany.

This project aims to provide students with an e-learning arrangement which seamlessly intertwines theoretical core knowledge and empirical skills in undergraduate econometrics. Of course, the focus is on empirical applications with R. Our goal is to enable students not only to learn how results of case studies can be replicated with R but we also intend to strengthen their ability in using the newly acquired skills in other empirical applications. This is supported by interactive end-of-chapter R programming exercises and interactive visualizations.

The book is mostly finished and covers all the chapters of Stock & Watson (2015) but we are continuously adding new exercises and improve it based on the feedback we receive from our students.

We hope that this project is a useful resource for other students and instructors alike and that it inspires teachers to develop similar material for their courses!

Repository @ Github: GitHub - mca91/EconometricsWithR: 📖An interactive companion to the well-received textbook 'Introduction to Econometrics' by Stock & Watson (2015)

Features and Some Technical Details

  • We use the bookdown::gitbook format. A few customizations have been made to style.css to adjust the visuals.

  • The interactive exercises are generated using the open source library datacamp-light.js. They are backed by an R session which is maintained on DataCamp’s servers. It uses submission correctness tests to provide students with feedback upon code submission. The exercises are easy to code and straightforward to integrate into any HTML bookdown project (this requires only basic knowledge of HTML).

  • The interactive visualizations support the understanding of central results (the textbook calls these Key Concepts). They are based on the JavaScript library D3.js.


    Make sure to check out Chapter 4.5 for more!

  • There are several small JavaScript extensions, e.g., folding of code and it's output and a copy button at the top-right corner of the code chunks which makes it convenient to work with larger code segments.

Thank You for looking at our submission!

Christoph Hanck, Martin Arnold, Alexander Gerber and Martin Schmelzer


Stock, J., & Watson, M. (2015). Introduction to Econometrics, Third Update, Global Edition. Pearson Education Limited.


The customized gitbook style is very neat, and the interactive exercises/demos are so awesome! Thanks for sharing!

BTW, you are welcome to add it to the bookdown archive:

Hey Yihui,

thank You!
We will definitely add the book to the bookdown archive! :slight_smile: