## Quantitative Methods I

This course in econometrics is designed for the Cambridge MPhil in Finance and the MPhil in Management Science & Operations. The course gives an introduction to the following concepts. For a textbook treatment of lectures 4 to 8 refer to chapters 2 to 9 in Jeffrey M. Wooldridge’s “Introductory Econometrics”.

#### Course material

Week | Lectures | Textbook | Exercises | Lab sessions |
---|---|---|---|---|

1 | Data and probability [Slides], Stock Market Experiment [Results, Data] | -- | -- | -- |

2 | Random variables and probability distributions [Slides, Notes, R-Script] | -- | Sheet 1 | General Introduction to R; Descriptive Statistics [Handout, R-Script] |

3 | Normal distribution, estimators, sampling distributions of estimators, tests of hypotheses [Slides, R-Script] | -- | Sheet 2 | -- |

4 | t-distribution, simple linear regression, OLS assumptions and properties of OLS estimators [Slides, R-Script] | Ch. 2 | Sheet 3 | Linear Regression in R; Good Practice Guide [Handout, R-Script] |

5 | Gauss-Markov Theorem, Precision of OLS estimators, Multiple regression models, Multicollinearity, F-tests for goodness of fit [Slides, R-Script] | Ch. 3-4 | Sheet 4 | -- |

6 | F-tests for goodness of fit, Non-linearity and Model Transformations, Dummy variables, Interactions [Slides, Log's, Int's, R-Script] | Ch. 6-7 | Sheet 5 | Model Selection; Inference; Dummy Variables [Handout, R-Script] |

7 | Specification errors and consequences [Slides, R-Script] | Ch. 8-9 | Sheet 6, WB1 | -- |

8 | Tests of regression assumptions, continued: Outliers and Influential observations [Slides, R-Script] | Ch. 9 | Sheet 7, WB2 | Generalized Least Squares [Handout, R-Script] |

#### Lectures

12, 19, 26 Oct, 2, 9, 16, 22, 29 Nov, all 2-4pm @ Mill Lane, Room 2

#### Lab sessions

R (Michael Freeman):

20 Oct, 2-4pm | 3, 17 Nov, both 11-1pm | 30 Nov, 9-11am, all @ Judge Business School Computer Lab

RExcel (Jerry Xiang He):

20 Oct, 2-4pm @ W2.02 | 3 Nov, 12.30-2.30pm @ W4.03 | 17 Nov, 2-4pm @ Computer Lab | 30 Nov, 9-11am @ KH107

#### Reading

- Dougherty, C. (2007) Introduction to econometrics. Judge: HB139.D68 2007
- Stock, J. and Watson, M. (2007) Introduction to econometrics. Judge: HB139.S76 2007
- Wooldridge, J. M. (2008) Introductory econometrics: a modern approach. Judge: HB139.W66 2008

#### Software

For the lab sessions we will use the open source software environment R. I think that it is helpful to coordinate on one environment. R has the advantage of being free and rather powerful. Read about R in this New York Times article.

##### R installation

- Download and install R from http://www.r-project.org:
- Under Download on left side click: CRAN
- Choose a local mirror in the UK, e.g., London or Bristol.
- Choose platform, e.g. Windows
- Select “base” (Binaries for base distribution (managed by Duncan Murdoch))
- Click “Download R 2.13.2 for Windows” (39 megabytes) to save and run Setup program: R-2.13.2-win32.exe

- Documentation for R is provided via the build in help (use, for example,
`help.search("t test")`

in the console) but also through the R Homepage. Useful are An Introduction to R and the R Reference Card. Other manuals are available on the website. - If you are new to R, I recommend working through W.J. Owen’s R tutorial. It is easy to read and tries to explain R with the help of examples from basic statistics.
- The R Commander allows an easy start with R using mouse and menu. Install the commander by typing
`install.packages("Rcmdr")`

and load it in the active workspace`library(Rcmdr)`

. You can run the Commander by typing`Commander()`

in the console.

##### RExcel installation

If you prefer to do your stats in a spreadsheet, consider RExcel, a free Excel add-in that combines the de facto industry standard for data analysis (Excel) and one of the most popular languages for econometrics and statistical research (R).

Download and install RExcel (for Windows) from http://rcom.univie.ac.at:

- Go to http://rcom.univie.ac.at/download.html
- Download RAndFriendsSetup2131V3.2-0-3
- Double click to install both R and RExcel
- Click OK whenever something pops up.

###### Install issues:

The following problems are usually caused by internet failure while installing RAndFriends (computer firewall blocked the installation), or computer security blocking launching of downloaded components:

- Excel does not show the RExcel Add-in,
- When clicking Start R, a warning pops up: “No R server configured”.

It is important to understand that RAndFriends downloads other components DURING the installation process, so if the user’s computer is not connected to the internet, then installation often fails.

- First remedy is to make sure computer is connected to the internet, and then relaunch RAndFriends
- This may fail again because of your computer’s own security system being overprotective, so the second remedy is to download several installers manually and install.
- download and install statconnDCOM
- download and install RExcel

###### Key settings you should be aware of are:

- If you get the warning message: “R server not found”, go to Addins -> Rexcel -> Set R Server, then select Background. Click Save and then Click Close.
- Excel Options -> Trust Center -> Trust Center Settings -> Macro Settings -> Trust Access to the VBA project object model

Other fixes are related to people having international language Windows OS. The guide below is for if you have SUCCESSFULLY installed Rexcel but are having trouble reproducing the class example. Possible fixes to strange incomprehensible RExcel errors are:

- Look at R Commander Window and make sure your data set is not named in a foreign language, e.g, if you see
`你哈蛤=read.table(' ...`

- Look at the data in Excel or in R Commander and make sure no strange symbols are appearing in your data. If so, restart Rexcel with a clean sheet, open the data in wordpad, copy the data, and then import via clipboard. On some computers, importing via the Rexcel menu rather than Excel itself also solves this issue.

Mac and Linux users have two options. Either download the OpenOffice.org extension ROOo from http://rcom.univie.ac.at/download.html (limited functionality), or install Windows 2008 server with Microsoft Office 2010 Professional trial.

###### Documentation

- To explore the options of RExcel, watch this video demonstration.
- Documentation for RExcel is available in the Springer book R through Excel. You can download the pdf version for free with your Raven password.

You can help us improve this site. If you spot errors, typos, and inconsistencies in the course resources (website, slides, handouts, exercise sheets) or want to share ideas and interesting resources, please send us an email.