# delimit ; set memory 5000; *************************************************; * Administrative Commands; *************************************************; set more off; clear; log using ch6_ee.log,replace; *************************************************; * Read in the Dataset; *************************************************; use cps98.dta; desc; **************************************************************; *; *; **************************************************************; * Question 1; regress ahe age female bachelor, robust; dis "Adjusted Rsquared = " _result(8); * Question 2; generate lnahe = ln(ahe); regress lnahe age female bachelor, robust; dis "Adjusted Rsquared = " _result(8); * Question 3; generate lnage = ln(age); regress lnahe lnage female bachelor, robust; dis "Adjusted Rsquared = " _result(8); * Question 3; generate age2 = age*age; regress lnahe age age2 female bachelor, robust; dis "Adjusted Rsquared = " _result(8); test age age2; * Question 9; generate fem_bac=female*bachelor; regress lnahe age age2 female bachelor fem_bac, robust; dis "Adjusted Rsquared = " _result(8); test age age2; * Question 10; generate fem_age=female*age; generate fem_age2=female*age2; regress lnahe age age2 fem_age fem_age2 female bachelor fem_bac, robust; dis "Adjusted Rsquared = " _result(8); test age age2 fem_age fem_age2; test fem_age fem_age2; test age age2; * Question 11; generate bac_age=bachelor*age; generate bac_age2=bachelor*age2; regress lnahe age age2 bac_age bac_age2 female bachelor fem_bac, robust; dis "Adjusted Rsquared = " _result(8); test age age2 bac_age bac_age2; test bac_age bac_age2; test age age2; log close; clear; exit;