data one; infile 'd:\sas\work\4213\berndt\chap2.dat\sas1.dat' firstobs=2 ; input tandy rkfree market; /* Creating new variables */ r_tandy = tandy - rkfree ; r_mkt = market - rkfree; /* Labeling New Variables */ label market = 'Risk-Free Rate of Return' tandy = 'Rate of Return for Tandy Corp' r_tandy = 'Risk Premium for Tandy Corp' r_mkt = 'Risk Premium for Market'; /* Printing first 5 observations */ proc print data=one (obs=5) label; var r_tandy r_mkt market rkfree tandy; /* Titling a data set */ title 'Tandy CAPM example'; title2 'OLS with Autoreg'; /* Ordinary Least Squares Estimation of the CAPM model using proc autoreg */ proc autoreg; model r_tandy= r_mkt; /* Ordinary Least Squares Estimation of the CAPM model using proc reg */ title2 'OLS with REG'; proc reg; model r_tandy= r_mkt; /* Ordinary Least Squares Estimation of the CAPM model using proc syslin */ title2 'OLS with SYSLIN'; proc syslin; model r_tandy= r_mkt; run;