/*This do file generates the Tables and Figures found in Chapter 11 of the text book XXXX */ *Begin by loading in the data Chapter 11 - Example 1 xxx *Set the data as time series tsset year label variable year "Year" *Put the variables in logs gen ln_i=ln(i) gen ln_c=ln(c) /*Generate a scatterplot of each variable over time */ scatter ln_i year scatter ln_c year /*Run the Dickey-Fuller test for each variable in levels */ dfuller ln_i, trend regress dfuller ln_c, trend regress /*Generate a scatterplot of the first difference of each variable over time */ scatter D.ln_i year scatter D.ln_c year /*Run the Dickey-Fuller test for the first difference of each variable */ dfuller D.ln_i, regress trend dfuller D.ln_c, regress trend /*Estimate a regression model using the first difference variables */ regress D.ln_c D.ln_i