1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;NOTE: ODS statements in the SAS Studio environment may disable some output features.7374 /********************* cars3.sas ***************************/75 title 'Metric Cars Data with proc glm';7677 /* Read data from Excel spreadsheet */78 proc import datafile="/folders/myfolders/441s18/Lecture/mcars4.xlsx"79 out=cars dbms=xlsx replace;80 getnames=yes;81NOTE: One or more variables were converted because the data type is not supported by the V9 engine. For more details, run withoptions MSGLEVEL=I.NOTE: The import data set has 100 observations and 4 variables.NOTE: WORK.CARS data set was successfully created.NOTE: PROCEDURE IMPORT used (Total process time):real time 0.03 secondscpu time 0.02 seconds82 data automobile;83 set cars;84 Country = Cntry;85 label Country = 'Location of Head Office'86 lper100k = 'Litres per 100 kilometers'87 weight = 'Weight in kg'88 length = 'Length in meters';8990 ods exclude MeanPlot (persist) DiffPlot (persist);91 /* Suppressing the proc glm plots */92NOTE: There were 100 observations read from the data set WORK.CARS.NOTE: The data set WORK.AUTOMOBILE has 100 observations and 5 variables.NOTE: DATA statement used (Total process time):real time 0.00 secondscpu time 0.01 seconds93 proc glm data = automobile;94 title2 'Analysis of Covariance';95 class Country;96 model lper100k = weight length country;97 lsmeans country / pdiff tdiff adjust=bon;98 run;99100 /* The following produces results that are difficult to interpret.101 The * notation is good for for interactions between factors,102 but proc reg is better for interactions between factors and103 covariates. */104NOTE: PROCEDURE GLM used (Total process time):real time 0.21 secondscpu time 0.21 seconds105 proc glm data = automobile noprint;106 title2 'With Interactions';107 class Country;108 model lper100k = weight length country109 weight*country length*country;110 lsmeans country / pdiff tdiff; /* Unadjusted, for comparison. */111 run;112113114115116117118119120121 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;134