* OLS Model for Phillips Curve
*
* Keywords:
* regression, ols, phillips curve, inverse, reciprocal, graph
*
* Description:
* We illustrate how to estimate Linear and Reciprocal OLS Models for
* Phillips Curve and create a graph
*
* Author(s):
* Skif Pankov
*
* Source:
* Damodar N. Gujarati and Dawn C. Porter, Basic Econometrics - 5th Edition
* McGraw-Hill International Edition, Chapter 6, Example 6.7 (page 170)
*
sample 1 47
* Reading the datafile and naming variables
read(data_6.7.shd) inflrate unrate
* Generating a yearly change in inflation rate and saving it as d1infl
genr d1infl = inflrate - lag(inflrate)
* Generating an inverse of the unemployment rate and saving it as invun
genr invun = 1/unrate
* Running an OLS regression of d1inflrate on unrate specifying to start from
* the second observation and to display residual statistics
ols d1infl unrate / beg=2 rstat
* Running an OLS regression of d1inflrate on invunrate,
* again specifying to start from the second observation:
ols d1infl invun / beg=2 end=47 rstat
* Plotting d1inflt against unrate
graph d1infl unrate
stop