1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
NOTE: ODS statements in the SAS Studio environment may disable some output features.
73
74 /* grapefruit1.sas */
75 title "Oneway ANOVA with repeated measures";
76 title2 'Grapefruit data (Applied linear statistical models, 5th ed., Prob 27.6)';
77
78 data grape1;
79 infile '/folders/myfolders/441s18/Lecture/grapefruit1.data.txt' firstobs=2;
80 input store sales1-sales3;
81 label sales1 = 'Sales at Price 1'
82 sales2 = 'Sales at Price 2'
83 sales3 = 'Sales at Price 3';
84 d12 = sales1-sales2; d13 = sales1-sales3; d23=sales2-sales3;
85
NOTE: The infile '/folders/myfolders/441s18/Lecture/grapefruit1.data.txt' is:
Filename=/folders/myfolders/441s18/Lecture/grapefruit1.data.txt,
Owner Name=root,Group Name=vboxsf,
Access Permission=-rwxrwx---,
Last Modified=March 08, 2018 11:06:28,
File Size (bytes)=522
NOTE: 8 records were read from the infile '/folders/myfolders/441s18/Lecture/grapefruit1.data.txt'.
The minimum record length was 56.
The maximum record length was 56.
NOTE: The data set WORK.GRAPE1 has 8 observations and 7 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
86 proc means n mean stddev maxdec=3;
87 var sales1-sales3;
88 run;
NOTE: There were 8 observations read from the data set WORK.GRAPE1.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.09 seconds
cpu time 0.08 seconds
89
90 proc reg plots=none;
91 title3 'Test H0: mu1=mu2=mu3 with proc reg';
92 model d12 d13 = ;
93 Price: mtest intercept=0;
94 run;
95
96 /* Linear combinations of response variables can be
97 specified within proc reg rather than in the data step. */
98
99 quit;
NOTE: PROCEDURE REG used (Total process time):
real time 0.22 seconds
cpu time 0.18 seconds
99 ! /* Weird that quit is needed for ods select to work, this time. */
100 ods select MultStat;
101 proc reg plots=none;
102 title3 'Specifying linear combinations within proc reg';
103 model sales1 sales2 sales3 = ;
104 Price: mtest intercept=0, sales1-sales2,
105 sales2-sales3;
106 run;
107
NOTE: PROCEDURE REG used (Total process time):
real time 0.08 seconds
cpu time 0.06 seconds
108 proc glm;
109 title3 'Test H0: mu1=mu2=mu3 with proc glm';
110 model sales1-sales3 = ;
111 repeated price / short summary mean;
112 run;
113 /* ods select MultStat; works with no quit, this time. */
114
NOTE: PROCEDURE GLM used (Total process time):
real time 0.40 seconds
cpu time 0.38 seconds
115 proc means mean t probt maxdec=3;
116 title3 'Pairwise matched t-tests';
117 var d12 d13 d23;
118 run;
NOTE: There were 8 observations read from the data set WORK.GRAPE1.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.06 seconds
cpu time 0.05 seconds
119
120
121 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
134