* The folloowing three commands are not essential. clear set memory 40m set more off *Use this if you want to save the estimation results in a log file. log using assets2.log, replace *Reading the data file insheet using "C:\Documents and Settings\jlee\My Documents\Teaching\EC671\assets2.dat" ** variables are: rmrf smb hml umd rf r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 using assets2.dat *Saving the data file save assets2_revised *next time, to use the stata do file, *use "C:\Documents and Settings\jlee\My Documents\Teaching\EC671\assets2_revised.do", clear *Descriptive statistic sum *or summarize _all *regression reg r1 rmrf reg r1 rmrf, robust *saving predicted values, residuals predict pred, xb predict res, residuals *exercises with partitioned matrices reg r1 rmrf smb reg rmrf smb predict res_rmrf, residuals reg r1 res_rmrf *RESET tests reg r1 rmrf smb predict r1_y, xb gen y2 = r1_y^2 gen y3 = r1_y^3 reg r1 rmrf smb y2 y3 test y2 y3