Routines
Disclaimer: It is a tradition for faculty and teaching assistants of Econ 508 to write statistical routines with the single purpose of stimulating students to create their own computational programs. Every year these routines are updated, and consequently they are subject to changes without prior notice. These routines are designed for educational purposes only, and the providers do not assume any responsibility for the outcomes of applying them outside the course.
R Language
Routine 
Description 
System 

Quantile Smoothing Splines 
R 

Censored Regression Model 
R 

Dantzig selector (Candes and Tao, 2005) 
R 

Augmented DickeyFuller test 
R 

Granger causality test 
R 

Routine for implementing Johansen's cointegration test 
R 

Code for the Figure 1, Lecture 9 (unit root forecast) 
R 

A collection of functions for panel estimation 
R 

Twostages least squares 
R 

Confidence ellipses and the Malinvaud example 
R 

Simulations to illustrate the HotellingSecrist effect 
R 

Simple version of the GrangerNewbold spurious regression simulation 
R 
Other Languages
Routine 
Description 
System 

Baseline dofile to help on calculating Akaike and Schwarz Inf. Criteria 
STATA 

Routine for implementing GrangerNewbold spurious regression example 
STATA 

Routine for computing means and deviations from means 
STATA 

Example batch file that estimates a productivity equation (run PQ.do first) 
STATA 