/*This do file generates the Tables and Figures found in Chapter 6 of the
text book XXXX
*/
*Begin by loading in the data Chapter 1 - Example 1
xxx
*Generate the log of consumption and income
gen ln_c=ln(c)
gen ln_i=ln(i)
*Label the variables
label variable ln_c "Log of Consumption"
label variable ln_i "Log of Income"
/*Run the regression with ln_c as the dependent variable and ln_i
as the independent variable.
*/
regress ln_c ln_i
/*Run the regression with ln_c as the dependent variable and ln_i
as the independent variable. This time include a dummy variable
where 1 indicates female and 0 indicates male
*/
regress ln_c ln_i d
*Generate a slope dummy variable
gen ln_i_d=ln_i*d
*label the new variable
label variable ln_i_d "Slope Dummy Term"
/*Run the regression with ln_c as the dependent variable and ln_i
as the independent variable. This time include a dummy variable
where 1 indicates female and 0 indicates male. Also include a slope
dummy variable
*/
regress ln_c ln_i d ln_i_d