/MarketAnalysis

Market Analysis Course with Interactive RTutor Problemsets, Videos and Quizzes

Primary LanguageHTMLOtherNOASSERTION

This repository contains the material for my course

Market Analysis with Econometrics and Machine Learning

taught by Sebastian Kranz at Ulm University. The course was adapted during the Corona crisis as an open online course and has many interactive elements.

Shiny apps with videos and quizzes

For an illustration of the course take a look at the shiny app with videos and quizzes for chapter 2b (Random Forests and Causal Forests):

https://mm.econ.mathematik.uni-ulm.de/public/ma-2b/

Interactive RTutor problem sets

Each section also has an interactive RTutor problem set where you work yourself through the material in R. You can automatically check your solutions and get hints. Here is a demo for Section 2b on shinyapps.io:

https://skranz.shinyapps.io/MarketAnalysis_2b/

(Note that the density of xkcd comics in the awards strongly increases from Section 2a onwards.) Given my limited budget I only have a free shinyapps.io account which has quite limited monthly usage hours. To solve the RTutor problem sets, you should install them on your own computer (explained further below) or solve them on the rstudio cloud here:

https://rstudio.cloud/project/1361010

Take a look at the README in the rstudio cloud project. Also this youtube video helps to get started with the first RTutor problem set, which is designed to be solved inside RStudio.

Course content

The course consists of the following 3 chapters.

Chapter 1 directly starts with an example illustrating why historical sales data may yield very misleading results if we want to estimate a demand function for a product. We then work through the econometric background focusing on endogeniety problems and approaches for estimating causal effects. Here are the links to the video quiz shiny apps:

Chapter 2 contrasts econometric modelling with the typical machine learning approach and covers some prediction algorithms like random forests. We discuss which questions can be well treated as classical prediction problems and in which situations good prediction accuracy on a test data set may not be a relevant criterion for the actual question we are interested in. We also illustrate causal forests, which is a novel method to identify heterogeneous causal effects in experiments.

Chapter 3 covers discrete choice models.

Local Installation for RTutor Problem Sets

To locally install the RTutor problem sets download and extract the ZIP of the MarketAnalysis Github repository.

Then run setup/install_packages.R to install all required packages and look at setup/setup.html to get started (here is a weblink). The instructions were created for the course at Ulm university where the problem sets where hosted on Moodle. If you have downloaded the Github version of the course, you find all problem sets in the directory RTutor (Of course, you won't be able to submit your solved problem sets anywhere if you are not a student at Ulm University who takes the course.)

To run the web-based problem sets starting from Section 2a, open the file RTutor/run_ps.R and the follow the steps described there.