* SHAZAM Example: Modelling the rate of growth of expenditure in services * expenditure on durable goods using an OLS regression with generated * variables and creating a graph * Author: Skif Pankov * * Source: * Damodar N. Gujarati and Dawn C. Porter, Basic Econometrics - 5th Edition * McGraw-Hill International Edition * Chapter 6, Example 6.4 (page 163) * * Analytical Techniques Demonstrated: * Ordinary Least Squares (OLS) regression * Generating variables * Plotting a graph * * Description: We generate log and time variable, run an OLS regression * with generated variables and generate a graph * sample 1 15 * Read the datafile and name the variables - we use the same datafile as in * Example 6.3 read (data_6.3.shd) expserv expdur expndur pcexp * Generating a log of expserv genr lnexs = log(expserv) * Generating a time index variable genr T = time(0) * Running an OLS regression of lnexs on T, stating that it is a log-linear * model, stating to show residual statistics and saving predicted values * in a variable plnexs ols lnexs T / rstat loglin predict=plnexs * Creating a plot of plnexs against T graph plnexs T stop