Instructions
The instructions for the assignment are as follows.
1. The assignment is due on 22 March at 19:00 the latest.
2. Drop your assignment in the box labelled ‘Econometrics’ located on the second floor of the P building
at the Department of Econometrics, in the corner next to the stairs.
3. Although you are allowed to hand in handwritten answers for the first part, we highly encourage you to
use R Markdown throughout the exercise. You can write both text and equations, and a lot of help on
how to use it can be found online.1 From the Markdown file, you can generate a PDF file by clicking on
the “Knit” button, which then is nicely formatted and shows clear answers. Furthermore, we provide a
template solution file, which you can then fill in accordingly. While this should have been fixed by IT
services by now, in case you get a package error on the university computers, please follow the following
steps:
1. Delete the folder M:\R (this folder should only contain R packages)
2. Run the following code: install.packages("htmltools","jsonlite") and click yes when
prompted
If you use your own computer and run into this error, we recommend reinstalling R completely.
4. When answering the empirical exercise, the code used and the results (i.e. values of statistics) from the
code need to be clearly stated and linked to your answers. In particular, first state the R code you use,
then provide the values of the statistics you calculate below the code, and beneath that provide your
answer that relates to the code. We highly encourage you to use R Markdown, since it combines code
with text in a readable format, as we show in the answer template we provide.
5. Using built-in R functions is not allowed. Build up everything from basic matrix algebra. For simple
operations such as calculating a mean, and for operations related to distributions (e.g. taking random
draws, getting the quantile), you can use the built-in R functions.
6. Work in groups of three.
7. State your full name and your student number on the front page of the assignment.
1 E.g. http://www.stat.cmu.edu/~cshalizi/rmarkdown/ provides a great summary of all necessary commands.
1