An example of multiple regression using proc reg in SAS.

Submit the following code in the editor window to analyze the cars data.


data cars;
input highway_mileage city_milage Price_as_Tested;
datalines;
26 20 23505
28 19 23000
26 20 16526
32 24 18565
30 23 22050
31 23 19800
25 22 21500
29 20 19970
28 23 23400
27 19 38545
30 18 42500
24 18 37708
28 19 30200
27 18 43755
26 17 22400
21 16 21100
24 17 20000
24 20 19589
20 19 19800
20 16 28000
15 13 24900
21 16 27500
20 14 32000
21 18 88136
21 17 58500
23 19 27141
25 18 44600
21 11 73129
20 16 72500
24 19 74178
;;;


proc reg data=cars;
title "Model 1: simple regression";
model PRICE_AS_TESTED = CITY_MILAGE;
run;


proc reg data=cars;
title "Model 2: multiple regression";
model PRICE_AS_TESTED = HIGHWAY_MILEAGE CITY_MILAGE;
run;