1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
NOTE: ODS statements in the SAS Studio environment may disable some output features.
71
72 /* grapefruit1.sas */
73 title "Oneway ANOVA with repeated measures";
74 title2 'Grapefruit data (Applied linear statistical models, 5th ed., Prob 27.6)';
75
76 data grape1;
77 infile '/home/brunner0/441s20/grapefruit1.data.txt' firstobs=2;
78 input store sales1-sales3;
79 label sales1 = 'Sales at Price 1'
80 sales2 = 'Sales at Price 2'
81 sales3 = 'Sales at Price 3';
82 d12 = sales1-sales2; d13 = sales1-sales3; d23=sales2-sales3;
83
NOTE: The infile '/home/brunner0/441s20/grapefruit1.data.txt' is:
Filename=/home/brunner0/441s20/grapefruit1.data.txt,
Owner Name=brunner0,Group Name=oda,
Access Permission=-rw-r--r--,
Last Modified=01Mar2020:17:02:42,
File Size (bytes)=522
NOTE: 8 records were read from the infile '/home/brunner0/441s20/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.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 761.34k
OS Memory 30376.00k
Timestamp 03/01/2020 10:15:19 PM
Step Count 66 Switch Count 2
Page Faults 0
Page Reclaims 161
Page Swaps 0
Voluntary Context Switches 18
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 264
84 proc means n mean stddev maxdec=3;
85 var sales1-sales3;
86 run;
NOTE: There were 8 observations read from the data set WORK.GRAPE1.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.03 seconds
user cpu time 0.03 seconds
system cpu time 0.01 seconds
memory 8416.43k
OS Memory 36796.00k
Timestamp 03/01/2020 10:15:19 PM
Step Count 67 Switch Count 1
Page Faults 0
Page Reclaims 1691
Page Swaps 0
Voluntary Context Switches 17
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 8
87
88 proc reg plots=none;
89 title3 'Test H0: mu1=mu2=mu3 with proc reg';
90 model d12 d13 = ;
91 Price: mtest intercept=0;
92 run;
93
94 /* Linear combinations of response variables can be
95 specified within proc reg rather than in the data step. */
96
97 quit;
NOTE: PROCEDURE REG used (Total process time):
real time 0.09 seconds
user cpu time 0.09 seconds
system cpu time 0.00 seconds
memory 2870.56k
OS Memory 33216.00k
Timestamp 03/01/2020 10:15:19 PM
Step Count 68 Switch Count 2
Page Faults 0
Page Reclaims 261
Page Swaps 0
Voluntary Context Switches 17
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 72
97 ! /* For some reason, this is needed to make ods select work. */
98 ods select MultStat;
99 proc reg plots=none;
100 title3 'Specifying linear combinations within proc reg';
101 model sales1 sales2 sales3 = ;
102 Price: mtest intercept=0, sales1-sales2,
103 sales2-sales3;
104 run;
105
NOTE: PROCEDURE REG used (Total process time):
real time 0.02 seconds
user cpu time 0.02 seconds
system cpu time 0.00 seconds
memory 2525.84k
OS Memory 33216.00k
Timestamp 03/01/2020 10:15:19 PM
Step Count 69 Switch Count 2
Page Faults 0
Page Reclaims 260
Page Swaps 0
Voluntary Context Switches 17
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 56
106 proc glm;
107 title3 'Test H0: mu1=mu2=mu3 with proc glm';
108 model sales1-sales3 = ;
109 repeated price / short summary mean;
110 run;
111 /* Could have done ods select MultStat -- no need for a quit this time. */
112
NOTE: PROCEDURE GLM used (Total process time):
real time 0.20 seconds
user cpu time 0.21 seconds
system cpu time 0.00 seconds
memory 2052.56k
OS Memory 32696.00k
Timestamp 03/01/2020 10:15:19 PM
Step Count 70 Switch Count 3
Page Faults 0
Page Reclaims 222
Page Swaps 0
Voluntary Context Switches 23
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 384
113 proc means mean t probt maxdec=3;
114 title3 'Pairwise matched t-tests';
115 var d12 d13 d23;
116 run;
NOTE: There were 8 observations read from the data set WORK.GRAPE1.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.02 seconds
user cpu time 0.02 seconds
system cpu time 0.01 seconds
memory 6548.09k
OS Memory 37564.00k
Timestamp 03/01/2020 10:15:19 PM
Step Count 71 Switch Count 2
Page Faults 0
Page Reclaims 1499
Page Swaps 0
Voluntary Context Switches 24
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 0
117 quit;
118
119
120 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
131