1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 /* mvtubes.sas */
74
75 title 'Multivariate tests on Little Fungus Tube data';
76
77 data mould;
78 infile '/home/u1407221/441s24/data/LittleTubes2.data.txt' firstobs=2;
79 input line id mcg length10 sclr10 weight rate;
80 label mcg = 'Mycelial Compatibility Group'
81 length10 = 'Length of fungus in tube at day 10'
82 sclr10 = 'Number of sclerotia at day 10'
83 weight = 'Sclerotial weight at end of experiment'
84 rate = 'Linear growth rate';
85 /* Make indicator dummy variables using arrays */
86 /* v1-v6 will have these values for every case. */
87 v1=198; v2=205; v3=213; v4=221; v5=223; v6=225;
88 array dummy{6} mcg198 mcg205 mcg213 mcg221 mcg223 mcg225;
89 array value{6} v1-v6;
90 do j = 1 to 6;
91 if mcg = . then dummy{j} = .;
92 else if mcg = value{j} then dummy{j}=1;
93 else dummy{j}=0;
94 end;
95 /* Effect coding */
96 array fungus{5} fungus1-fungus5;
97 do i = 1 to 5;
98 if mcg=225 then fungus{i} = -1;
99 else fungus{i}=dummy{i};
100 end;
101 /*
102 proc freq;
103 title2 'Check dummy variable creation';
104 tables (mcg198--mcg225 fungus1-fungus5)*mcg / norow nocol nopercent missing;
105 */
106
NOTE: The infile '/home/u1407221/441s24/data/LittleTubes2.data.txt' is:
Filename=/home/u1407221/441s24/data/LittleTubes2.data.txt,
Owner Name=u1407221,Group Name=oda,
Access Permission=-rw-r--r--,
Last Modified=20Mar2024:14:04:08,
File Size (bytes)=1775
NOTE: 24 records were read from the infile '/home/u1407221/441s24/data/LittleTubes2.data.txt'.
The minimum record length was 69.
The maximum record length was 69.
NOTE: The data set WORK.MOULD has 24 observations and 26 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 816.84k
OS Memory 32680.00k
Timestamp 03/20/2024 06:38:27 PM
Step Count 97 Switch Count 2
Page Faults 0
Page Reclaims 168
Page Swaps 0
Voluntary Context Switches 17
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 264
107 proc means;
108 title2 'Potential response variables broken down by MCG';
109 class mcg;
110 var length10 sclr10 weight rate;
111
112 /* Using just length10 and weight to limit the output */
113
NOTE: There were 24 observations read from the data set WORK.MOULD.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.08 seconds
user cpu time 0.09 seconds
system cpu time 0.01 seconds
memory 10181.29k
OS Memory 40124.00k
Timestamp 03/20/2024 06:38:27 PM
Step Count 98 Switch Count 2
Page Faults 0
Page Reclaims 1881
Page Swaps 0
Voluntary Context Switches 15
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 16
114 proc glm;
115 title2 'Manova with proc glm';
116 class mcg;
117 model length10 weight = mcg;
118 /* Test equality of mcgs excluding 198: a COLLECTION of contrasts */
119 contrast 'AllBut198' mcg 0 1 -1 0 0 0,
120 mcg 0 0 1 -1 0 0,
121 mcg 0 0 0 1 -1 0,
122 mcg 0 0 0 0 1 -1;
123 manova H = _all_; /* Test all main effects and interactions */
124 means mcg;
125 /* lsmeans output is strictly univariate */
126
NOTE: PROCEDURE GLM used (Total process time):
real time 0.64 seconds
user cpu time 0.37 seconds
system cpu time 0.04 seconds
memory 25214.51k
OS Memory 54716.00k
Timestamp 03/20/2024 06:38:28 PM
Step Count 99 Switch Count 3
Page Faults 0
Page Reclaims 7110
Page Swaps 0
Voluntary Context Switches 2439
Involuntary Context Switches 1
Block Input Operations 0
Block Output Operations 2528
127 proc reg plots=none;
128 title2 'Manova with proc reg and effect coding;';
129 model length10 weight = fungus1-fungus5;
130 overall: mtest fungus1=fungus2=fungus3=fungus4=fungus5=0;
131
NOTE: PROCEDURE REG used (Total process time):
real time 0.08 seconds
user cpu time 0.09 seconds
system cpu time 0.00 seconds
memory 2439.50k
OS Memory 54720.00k
Timestamp 03/20/2024 06:38:28 PM
Step Count 100 Switch Count 2
Page Faults 0
Page Reclaims 302
Page Swaps 0
Voluntary Context Switches 20
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 104
132 proc reg plots=none;
133 title2 'Manova with proc reg and cell means coding';
134 model length10 weight = mcg198 mcg205 mcg213 mcg221 mcg223 mcg225 / noint;
135 Overall: test mcg198=mcg205=mcg213=mcg221=mcg223=mcg225;
136 mOverall: mtest mcg198=mcg205=mcg213=mcg221=mcg223=mcg225;
137 AllBut198: test mcg205=mcg213=mcg221=mcg223=mcg225;
138 mAllBut198: mtest mcg205=mcg213=mcg221=mcg223=mcg225;
139 run;
140 quit;
NOTE: PROCEDURE REG used (Total process time):
real time 0.12 seconds
user cpu time 0.12 seconds
system cpu time 0.00 seconds
memory 2569.51k
OS Memory 54720.00k
Timestamp 03/20/2024 06:38:28 PM
Step Count 101 Switch Count 2
Page Faults 0
Page Reclaims 278
Page Swaps 0
Voluntary Context Switches 18
Involuntary Context Switches 1
Block Input Operations 0
Block Output Operations 168
141
142
143 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
155