Libname S3A3 "D:\STAT 3A03\Fall 2017\Data"; * Replace the path above with the path to whatever folder you use for this course; PROC IMPORT out=CSdata datafile="D:\STAT 3A03\Fall 2017\Data\CSData.txt" DBMS=DLM REPLACE; Getnames=yes; Datarow=2; run; Data Csdata1; Set S3A3.CSdata; Math=HSM+SATM/80; run; PROC REG Data=Csdata1 plots=none; Model GPA=Math; Model GPA=HSM Math; Model GPA=SATM Math; run; quit; PROC REG Data=Csdata1 plots=none; Model GPA=SATM HSM; run; quit; * A model in which the X matrix is not of full rank; PROC REG Data=Csdata1 plots=none; Model GPA=HSM SATM Math; run; quit; PROC IMPORT out=S3A3.Fuel datafile="Fuel2001.txt" DBMS=DLM REPLACE; Getnames=yes; Datarow=2; run; Data S3A3.Fuel_trans; Set S3A3.Fuel; Fuel=1000*FuelC/Pop; Dlic=1000*Drivers/Pop; LogMiles=log2(Miles); run; * Fuel Consumption Example; PROC REG Data=S3A3.Fuel_trans plots=none outest=S3A3.Fuel_ests Tableout; Model Fuel=Tax DLic Income LogMiles; Output Out=S3A3.Fuel_out Predicted=fitted Residual=resid; Plot Fuel*Pred.; run; quit; PROC REG Data=S3A3.Fuel_out plots=none; Model Fuel=fitted; Plot Fuel*fitted; run; quit;