* Measurement Bias in OLS Regression
*
* Keywords:
* regression, ols, measurement, error, bias
*
* Description:
* We illustrate how to estimate a Linear OLS Model and show how
* Measurement Errors create Biases in estimates
*
* Author(s):
* Skif Pankov
*
* Source:
* Damodar N. Gujarati and Dawn C. Porter, Basic Econometrics - 5th Edition
* McGraw-Hill International Edition, Chapter 13, Example 13.2 (page 485)
*
sample 1 10
* Reading the datafile and naming variables
read(data_13.2.shd) yt xt y x
* Running an OLS regression of the "true" value of Y (yt) on the "true"
* value of X (xt)
ols yt xt
* Running an OLS regression of the observed value of Y (y) on the "true"
* value of X (xt)
ols y xt
* Running an OLS regression of the "true" value of Y (yt) on the "observed"
* value of X (x) - this regression will produced biased estimates in
* comparison with the previous two regressions
ols yt x
stop
* Note:
* the estimates of coefficients in the last regression will differ from
* those in the book - it is likely that authors used different data