Solved
New Contributor
Posts: 4

# equality of variance test for 2-way or factorial anova

Is there a test available  for use with Proc GLM that tests for equality of variance with multiple factors ?  The HOVTEST option seems to only work with one-way anova ?

Accepted Solutions
Solution
‎02-24-2017 10:06 AM
Posts: 3,805

## Re: equality of variance test for 2-way or factorial anova

I am suggesting that you create a TReaTment variable from SYS and _NAME_.

Seems like you may have a data error as I expect balance with all N's equal.

``````data flat_north_anova_T;
infile cards firstobs=2;
input obs irr_id acres sys \$ _name_ \$ et_value;
length trt \$32;
trt = catx('-',sys,_name_);
cards;
Obs IRR_ID ACRES SYS _NAME_ ET_value
1 8169 43.67 SPRIN METRIC_ET 13.09
2 8169 43.67 SPRIN MWSI_ET 13.8
3 8169 43.67 SPRIN NRIS_ET 12.88
4 8321 168.11 SPRIN METRIC_ET 27.12
5 8321 168.11 SPRIN MWSI_ET 14.8
6 8321 168.11 SPRIN NRIS_ET 17.52
7 8607 42.95 FLOOD METRIC_ET 20.03
8 8607 42.95 FLOOD MWSI_ET 10.9
9 8607 42.95 FLOOD NRIS_ET 16.82
10 8794 140.98 SPRIN METRIC_ET 23.48
11 8794 140.98 SPRIN MWSI_ET 14.4
12 8794 140.98 SPRIN NRIS_ET 17.6
13 8955 31.46 SPRIN METRIC_ET 22.97
14 8955 31.46 SPRIN MWSI_ET 12.5
15 8955 31.46 SPRIN NRIS_ET 19.48
16 9541 80.98 FLOOD METRIC_ET 19.7
17 9541 80.98 FLOOD MWSI_ET 10.1
18 9541 80.98 FLOOD NRIS_ET 15.2
19 9543 13.68 FLOOD METRIC_ET 15.13
20 9543 13.68 FLOOD MWSI_ET 8.3
21 9543 13.68 FLOOD NRIS_ET 8.88
22 9564 10.69 FLOOD METRIC_ET 23.36
23 9564 10.69 FLOOD MWSI_ET 12.1
24 9564 10.69 FLOOD NRIS_ET 14.09
25 9870 24.37 FLOOD METRIC_ET 17.7
26 9870 24.37 FLOOD MWSI_ET 8.5
27 9870 24.37 FLOOD NRIS_ET 9.95
28 9935 32.09 FLOOD METRIC_ET 24.11
29 9935 32.09 FLOOD MWSI_ET 12.5
30 9935 32.09 FLOOD NRIS_ET 15.67
31 9948 5.38 FLOOD METRIC_ET 23.23
32 9948 5.38 FLOOD MWSI_ET 13.4
33 9948 5.38 FLOOD NRIS_ET 14.73
34 10010 11.37 SPRIN METRIC_ET 22.86
35 10010 11.37 SPRIN MWSI_ET 13
36 10010 11.37 SPRIN NRIS_ET 15.81
37 10060 151.48 SPRIN METRIC_ET 24.46
38 10060 151.48 SPRIN MWSI_ET 18.8
39 10060 151.48 SPRIN NRIS_ET 22.09
40 10562 54.43 SPRIN METRIC_ET 16.26
41 10562 54.43 SPRIN MWSI_ET 11.8
42 10562 54.43 SPRIN NRIS_ET 13.94
43 10700 6.19 FLOOD METRIC_ET 18.37
44 10700 6.19 FLOOD MWSI_ET 9.7
45 10700 6.19 FLOOD NRIS_ET 14.49
46 10911 27.24 SPRIN METRIC_ET 25.99
47 10911 27.24 SPRIN MWSI_ET 14.7
48 10911 27.24 SPRIN NRIS_ET 19.22
49 10935 39.44 FLOOD METRIC_ET 15.58
50 10935 39.44 FLOOD MWSI_ET 9.7
51 10935 39.44 FLOOD NRIS_ET 15.69
52 10943 5.32 SPRIN METRIC_ET 17.16
53 10943 5.32 SPRIN MWSI_ET 8.9
54 10943 5.32 SPRIN NRIS_ET 13.86
55 10948 50.37 FLOOD METRIC_ET 20.19
56 10948 50.37 FLOOD MWSI_ET 11.4
57 10948 50.37 FLOOD NRIS_ET 13.91
58 10955 30.09 SPRIN METRIC_ET 26.97
59 10955 30.09 SPRIN MWSI_ET 17.1
60 10955 30.09 SPRIN NRIS_ET 19.23
61 11041 15.15 SPRIN METRIC_ET 21.07
62 11041 15.15 SPRIN MWSI_ET 13.1
63 11041 15.15 SPRIN NRIS_ET 17.98
64 11146 11.11 FLOOD METRIC_ET 23.56
65 11146 11.11 FLOOD MWSI_ET 14.9
66 11146 11.11 FLOOD NRIS_ET 17.52
67 11195 124 SPRIN METRIC_ET 20.95
68 11195 124 SPRIN MWSI_ET 8.8
69 11195 124 SPRIN NRIS_ET 15.44
70 11198 9 SPRIN METRIC_ET 14.2
71 11198 9 SPRIN MWSI_ET 11.6
72 11198 9 SPRIN NRIS_ET 11.8
73 11200 6.5 SPRIN METRIC_ET 28.11
74 11200 6.5 SPRIN MWSI_ET 19.9
75 11200 6.5 SPRIN NRIS_ET 24.75
76 11203 5.6 SPRIN METRIC_ET 26.96
77 11203 5.6 SPRIN MWSI_ET 20
78 11203 5.6 SPRIN NRIS_ET 28.43
79 11366 31.85 FLOOD METRIC_ET 26.85
80 11366 31.85 FLOOD MWSI_ET 18.1
81 11366 31.85 FLOOD NRIS_ET 23.11
82 11391 12.89 SPRIN METRIC_ET 22.01
83 11391 12.89 SPRIN MWSI_ET 17.5
84 11391 12.89 SPRIN NRIS_ET 16.7
85 11422 125.34 SPRIN METRIC_ET 27.88
86 11422 125.34 SPRIN MWSI_ET 21.2
87 11422 125.34 SPRIN NRIS_ET 25.39
88 11425 55.13 SPRIN METRIC_ET 20.48
89 11425 55.13 SPRIN MWSI_ET 12
90 11425 55.13 SPRIN NRIS_ET 19.47
91 11428 12.87 SPRIN METRIC_ET 21.79
92 11428 12.87 SPRIN MWSI_ET 18.5
93 11428 12.87 SPRIN NRIS_ET 22.28
94 11444 8.16 SPRIN METRIC_ET 22.51
95 11444 8.16 SPRIN MWSI_ET 12.4
96 11444 8.16 SPRIN NRIS_ET 17.96
97 11467 11.69 FLOOD METRIC_ET 16.07
98 11467 11.69 FLOOD MWSI_ET 8.7
99 11467 11.69 FLOOD NRIS_ET 12.21
100 11471 29.86 FLOOD METRIC_ET 19.37
101 11471 29.86 FLOOD MWSI_ET 13.9
102 11471 29.86 FLOOD NRIS_ET 18.1
103 11477 5.54 FLOOD METRIC_ET 19.46
104 11477 5.54 FLOOD MWSI_ET 13.3
105 11477 5.54 FLOOD NRIS_ET 17.7
106 11483 63.06 FLOOD METRIC_ET 25.24
107 11483 63.06 FLOOD MWSI_ET 15.8
108 11483 63.06 FLOOD NRIS_ET 21.53
109 11494 132.55 FLOOD METRIC_ET 24.61
110 11494 132.55 FLOOD MWSI_ET 13.6
111 11494 132.55 FLOOD NRIS_ET 15.03
112 11501 15.77 FLOOD METRIC_ET 25.84
113 11501 15.77 FLOOD MWSI_ET 17.6
114 11501 15.77 FLOOD NRIS_ET 20.37
115 11557 92.48 SPRIN METRIC_ET 19.69
116 11557 92.48 SPRIN MWSI_ET 11.2
117 11557 92.48 SPRIN NRIS_ET 16.22
118 11566 33.4 FLOOD METRIC_ET 23.6
119 11566 33.4 FLOOD MWSI_ET 9.6
120 11566 33.4 FLOOD NRIS_ET 10.81
121 11567 53.89 FLOOD METRIC_ET 20.3
122 11567 53.89 FLOOD MWSI_ET 10.2
123 11567 53.89 FLOOD NRIS_ET 13.17
124 11601 39.65 SPRIN METRIC_ET 17.72
125 11601 39.65 SPRIN MWSI_ET 9.8
126 11601 39.65 SPRIN NRIS_ET 15.94
127 11603 29.39 FLOOD METRIC_ET 19.04
128 11603 29.39 FLOOD MWSI_ET 8.8
129 11603 29.39 FLOOD NRIS_ET 10.71
130 11702 6.72 SPRIN METRIC_ET 12.37
131 11702 6.72 SPRIN MWSI_ET 8.6
132 11702 6.72 SPRIN NRIS_ET 11.51
133 11703 16.17 SPRIN METRIC_ET 15.35
134 11703 16.17 SPRIN MWSI_ET 10.4
135 11703 16.17 SPRIN NRIS_ET 13.21
136 11781 56.95 SPRIN METRIC_ET 19.2
137 11781 56.95 SPRIN MWSI_ET 8.6
138 11781 56.95 SPRIN NRIS_ET 11.04
139 11961 76.95 SPRIN METRIC_ET 26.49
140 11961 76.95 SPRIN MWSI_ET 16
141 11961 76.95 SPRIN NRIS_ET 17.34
142 11963 32.34 FLOOD METRIC_ET 29.77
143 11963 32.34 FLOOD MWSI_ET 16.5
144 11963 32.34 FLOOD NRIS_ET 22.47
145 12249 37.36 SPRIN METRIC_ET 20.65
146 12249 37.36 SPRIN MWSI_ET 15.8
147 12249 37.36 SPRIN NRIS_ET 17.93
148 12266 36.19 FLOOD METRIC_ET 19.25
149 12266 36.19 FLOOD MWSI_ET 11.4
150 12266 36.19 FLOOD NRIS_ET 13.69
151 12272 36.33 SPRIN METRIC_ET 21.7
152 12272 36.33 SPRIN MWSI_ET 12.4
153 12272 36.33 SPRIN NRIS_ET 17.21
154 12275 39.6 FLOOD METRIC_ET 25.98
155 12275 39.6 FLOOD MWSI_ET 14.8
156 12275 39.6 FLOOD NRIS_ET 20.15
157 12312 58.06 SPRIN METRIC_ET 21.06
158 12312 58.06 SPRIN MWSI_ET 13.7
159 12312 58.06 SPRIN NRIS_ET 18.37
160 12314 35.88 SPRIN METRIC_ET 23.96
161 12314 35.88 SPRIN MWSI_ET 15.4
162 12314 35.88 SPRIN NRIS_ET 18.35
163 12323 8.2 FLOOD METRIC_ET 20.81
164 12323 8.2 FLOOD MWSI_ET 8.9
165 12323 8.2 FLOOD NRIS_ET 11.29
166 12330 22.59 FLOOD METRIC_ET 19.91
167 12330 22.59 FLOOD MWSI_ET 10.1
168 12330 22.59 FLOOD NRIS_ET 13.52
169 12336 34.8 SPRIN METRIC_ET 21.21
170 12336 34.8 SPRIN MWSI_ET 12.1
171 12336 34.8 SPRIN NRIS_ET 14.3
172 12338 33.26 FLOOD METRIC_ET 17.96
173 12338 33.26 FLOOD MWSI_ET 9.7
174 12338 33.26 FLOOD NRIS_ET 11.88
175 12342 118.13 SPRIN METRIC_ET 17.32
176 12342 118.13 SPRIN MWSI_ET 9.8
177 12342 118.13 SPRIN NRIS_ET 14.73
178 12395 6.7 FLOOD METRIC_ET 27.93
179 12395 6.7 FLOOD MWSI_ET 18.1
180 12395 6.7 FLOOD NRIS_ET 23.54
181 12706 58.82 SPRIN METRIC_ET 20.91
182 12706 58.82 SPRIN MWSI_ET 14.9
183 12706 58.82 SPRIN NRIS_ET 17.58
184 12710 41.52 FLOOD METRIC_ET 19.25
185 12710 41.52 FLOOD MWSI_ET 12.5
186 12710 41.52 FLOOD NRIS_ET 16.39
187 12713 8.57 FLOOD METRIC_ET 21.42
188 12713 8.57 FLOOD MWSI_ET 11.3
189 12713 8.57 FLOOD NRIS_ET 14.62
190 12714 10.53 FLOOD METRIC_ET 14.49
191 12714 10.53 FLOOD MWSI_ET 8.3
192 12714 10.53 FLOOD NRIS_ET 10.7
193 12740 29.79 FLOOD METRIC_ET 18.66
194 12740 29.79 FLOOD MWSI_ET 9.3
195 12740 29.79 FLOOD NRIS_ET 11.08
196 12742 75.46 SPRIN METRIC_ET 27.31
197 12742 75.46 SPRIN MWSI_ET 15.6
198 12742 75.46 SPRIN NRIS_ET 16.82
199 12743 10.3 FLOOD METRIC_ET 22.49
200 12743 10.3 FLOOD MWSI_ET 12.3
201 12743 10.3 FLOOD NRIS_ET 15.56
202 12755 19.04 FLOOD METRIC_ET 17.82
203 12755 19.04 FLOOD MWSI_ET 10.3
204 12755 19.04 FLOOD NRIS_ET 13.58
205 12767 39.18 SPRIN METRIC_ET 29.51
206 12767 39.18 SPRIN MWSI_ET 18.2
207 12767 39.18 SPRIN NRIS_ET 24.93
208 12790 44.02 FLOOD METRIC_ET 17.75
209 12790 44.02 FLOOD MWSI_ET 8.4
210 12790 44.02 FLOOD NRIS_ET 10.66
211 12801 9.66 SPRIN METRIC_ET 25.21
212 12801 9.66 SPRIN MWSI_ET 15.9
213 12801 9.66 SPRIN NRIS_ET 21.13
214 12808 28.54 SPRIN METRIC_ET 22.91
215 12808 28.54 SPRIN MWSI_ET 13.4
216 12808 28.54 SPRIN NRIS_ET 15.72
217 12816 25.81 FLOOD METRIC_ET 16.91
218 12816 25.81 FLOOD MWSI_ET 8.2
219 12816 25.81 FLOOD NRIS_ET 14.34
220 12827 30.18 SPRIN METRIC_ET 24.34
221 12827 30.18 SPRIN MWSI_ET 16.4
222 12827 30.18 SPRIN NRIS_ET 21.96
223 12829 6.61 SPRIN METRIC_ET 19.4
224 12829 6.61 SPRIN MWSI_ET 7.8
225 12829 6.61 SPRIN NRIS_ET 20.84
226 12830 19.62 SPRIN METRIC_ET 25.71
227 12830 19.62 SPRIN MWSI_ET 15.8
228 12830 19.62 SPRIN NRIS_ET 19.37
229 76153 5.88 FLOOD METRIC_ET 17.1
230 76153 5.88 FLOOD MWSI_ET 8
231 76153 5.88 FLOOD NRIS_ET 9.96
232 76674 16.01 FLOOD METRIC_ET 19.54
233 76674 16.01 FLOOD MWSI_ET 10.8
234 76674 16.01 FLOOD NRIS_ET 13.17
235 100761 15.89 FLOOD METRIC_ET 23.39
236 100761 15.89 FLOOD MWSI_ET 10.5
237 100761 15.89 FLOOD NRIS_ET 13.56
238 101036 29.78 SPRIN METRIC_ET 19.77
239 101036 29.78 SPRIN MWSI_ET 10.4
240 101036 29.78 SPRIN NRIS_ET 13.81
;;;;
run;
proc print;
run;
PROC GLM DATA=flat_north_anova_T;
CLASS _name_ sys;
MODEL ET_value= _name_|sys/ SS3 ;
Means _name_*sys;
run;
PROC GLM DATA=flat_north_anova_T;
CLASS trt;
MODEL ET_value= trt / SS3 ;
Means trt / hovtest=levene;
run;
``````

All Replies
Posts: 3,805

## Re: equality of variance test for 2-way or factorial anova

[ Edited ]

``````data HOVTEST;
do a = 0,1;
do b = 0,1;
do c= 0,1;
length trt \$3;
trt = cats(a,b,c);
do r = 1 to 3;
y = rannor(1245);
output;
end;
end;
end;
end;
run;
proc print;
run;
proc glm;
class a b c;
model y = a|b|c;
means a*b*c;
run;
proc glm;
class trt;
model y = trt;
means trt / hovtest=levene;
run;``````

New Contributor
Posts: 4

## Re: equality of variance test for 2-way or factorial anova

Thanks. I tried this but my dataset structure is a little different. My dataset (below) consists of a 2 x 3 factorial.

The SAS program I used is:

PROC GLM DATA=flat_north_anova_T plots=diagnostics ;
CLASS _name_ sys;
MODEL ET_value= _name_ sys _name_*sys/ SS3 ;
Means _name_;

run;

It is not clear how to modify the dataset to work with your program-in addition it seems that LSMEANS should be used rather than MEANS ?

Obs IRR_ID ACRES SYS _NAME_ ET_value

1 8169 43.67 SPRIN METRIC_ET 13.09
2 8169 43.67 SPRIN MWSI_ET 13.8
3 8169 43.67 SPRIN NRIS_ET 12.88
4 8321 168.11 SPRIN METRIC_ET 27.12
5 8321 168.11 SPRIN MWSI_ET 14.8
6 8321 168.11 SPRIN NRIS_ET 17.52
7 8607 42.95 FLOOD METRIC_ET 20.03
8 8607 42.95 FLOOD MWSI_ET 10.9
9 8607 42.95 FLOOD NRIS_ET 16.82
10 8794 140.98 SPRIN METRIC_ET 23.48
11 8794 140.98 SPRIN MWSI_ET 14.4
12 8794 140.98 SPRIN NRIS_ET 17.6
13 8955 31.46 SPRIN METRIC_ET 22.97
14 8955 31.46 SPRIN MWSI_ET 12.5
15 8955 31.46 SPRIN NRIS_ET 19.48
16 9541 80.98 FLOOD METRIC_ET 19.7
17 9541 80.98 FLOOD MWSI_ET 10.1
18 9541 80.98 FLOOD NRIS_ET 15.2
19 9543 13.68 FLOOD METRIC_ET 15.13
20 9543 13.68 FLOOD MWSI_ET 8.3
21 9543 13.68 FLOOD NRIS_ET 8.88
22 9564 10.69 FLOOD METRIC_ET 23.36
23 9564 10.69 FLOOD MWSI_ET 12.1
24 9564 10.69 FLOOD NRIS_ET 14.09
25 9870 24.37 FLOOD METRIC_ET 17.7
26 9870 24.37 FLOOD MWSI_ET 8.5
27 9870 24.37 FLOOD NRIS_ET 9.95
28 9935 32.09 FLOOD METRIC_ET 24.11
29 9935 32.09 FLOOD MWSI_ET 12.5
30 9935 32.09 FLOOD NRIS_ET 15.67
31 9948 5.38 FLOOD METRIC_ET 23.23
32 9948 5.38 FLOOD MWSI_ET 13.4
33 9948 5.38 FLOOD NRIS_ET 14.73
34 10010 11.37 SPRIN METRIC_ET 22.86
35 10010 11.37 SPRIN MWSI_ET 13
36 10010 11.37 SPRIN NRIS_ET 15.81
37 10060 151.48 SPRIN METRIC_ET 24.46
38 10060 151.48 SPRIN MWSI_ET 18.8
39 10060 151.48 SPRIN NRIS_ET 22.09
40 10562 54.43 SPRIN METRIC_ET 16.26
41 10562 54.43 SPRIN MWSI_ET 11.8
42 10562 54.43 SPRIN NRIS_ET 13.94
43 10700 6.19 FLOOD METRIC_ET 18.37
44 10700 6.19 FLOOD MWSI_ET 9.7
45 10700 6.19 FLOOD NRIS_ET 14.49
46 10911 27.24 SPRIN METRIC_ET 25.99
47 10911 27.24 SPRIN MWSI_ET 14.7
48 10911 27.24 SPRIN NRIS_ET 19.22
49 10935 39.44 FLOOD METRIC_ET 15.58
50 10935 39.44 FLOOD MWSI_ET 9.7
51 10935 39.44 FLOOD NRIS_ET 15.69
52 10943 5.32 SPRIN METRIC_ET 17.16
53 10943 5.32 SPRIN MWSI_ET 8.9
54 10943 5.32 SPRIN NRIS_ET 13.86
55 10948 50.37 FLOOD METRIC_ET 20.19
56 10948 50.37 FLOOD MWSI_ET 11.4
57 10948 50.37 FLOOD NRIS_ET 13.91
58 10955 30.09 SPRIN METRIC_ET 26.97
59 10955 30.09 SPRIN MWSI_ET 17.1
60 10955 30.09 SPRIN NRIS_ET 19.23
61 11041 15.15 SPRIN METRIC_ET 21.07
62 11041 15.15 SPRIN MWSI_ET 13.1
63 11041 15.15 SPRIN NRIS_ET 17.98
64 11146 11.11 FLOOD METRIC_ET 23.56
65 11146 11.11 FLOOD MWSI_ET 14.9
66 11146 11.11 FLOOD NRIS_ET 17.52
67 11195 124 SPRIN METRIC_ET 20.95
68 11195 124 SPRIN MWSI_ET 8.8
69 11195 124 SPRIN NRIS_ET 15.44
70 11198 9 SPRIN METRIC_ET 14.2
71 11198 9 SPRIN MWSI_ET 11.6
72 11198 9 SPRIN NRIS_ET 11.8
73 11200 6.5 SPRIN METRIC_ET 28.11
74 11200 6.5 SPRIN MWSI_ET 19.9
75 11200 6.5 SPRIN NRIS_ET 24.75
76 11203 5.6 SPRIN METRIC_ET 26.96
77 11203 5.6 SPRIN MWSI_ET 20
78 11203 5.6 SPRIN NRIS_ET 28.43
79 11366 31.85 FLOOD METRIC_ET 26.85
80 11366 31.85 FLOOD MWSI_ET 18.1
81 11366 31.85 FLOOD NRIS_ET 23.11
82 11391 12.89 SPRIN METRIC_ET 22.01
83 11391 12.89 SPRIN MWSI_ET 17.5
84 11391 12.89 SPRIN NRIS_ET 16.7
85 11422 125.34 SPRIN METRIC_ET 27.88
86 11422 125.34 SPRIN MWSI_ET 21.2
87 11422 125.34 SPRIN NRIS_ET 25.39
88 11425 55.13 SPRIN METRIC_ET 20.48
89 11425 55.13 SPRIN MWSI_ET 12
90 11425 55.13 SPRIN NRIS_ET 19.47
91 11428 12.87 SPRIN METRIC_ET 21.79
92 11428 12.87 SPRIN MWSI_ET 18.5
93 11428 12.87 SPRIN NRIS_ET 22.28
94 11444 8.16 SPRIN METRIC_ET 22.51
95 11444 8.16 SPRIN MWSI_ET 12.4
96 11444 8.16 SPRIN NRIS_ET 17.96
97 11467 11.69 FLOOD METRIC_ET 16.07
98 11467 11.69 FLOOD MWSI_ET 8.7
99 11467 11.69 FLOOD NRIS_ET 12.21
100 11471 29.86 FLOOD METRIC_ET 19.37
101 11471 29.86 FLOOD MWSI_ET 13.9
102 11471 29.86 FLOOD NRIS_ET 18.1
103 11477 5.54 FLOOD METRIC_ET 19.46
104 11477 5.54 FLOOD MWSI_ET 13.3
105 11477 5.54 FLOOD NRIS_ET 17.7
106 11483 63.06 FLOOD METRIC_ET 25.24
107 11483 63.06 FLOOD MWSI_ET 15.8
108 11483 63.06 FLOOD NRIS_ET 21.53
109 11494 132.55 FLOOD METRIC_ET 24.61
110 11494 132.55 FLOOD MWSI_ET 13.6
111 11494 132.55 FLOOD NRIS_ET 15.03
112 11501 15.77 FLOOD METRIC_ET 25.84
113 11501 15.77 FLOOD MWSI_ET 17.6
114 11501 15.77 FLOOD NRIS_ET 20.37
115 11557 92.48 SPRIN METRIC_ET 19.69
116 11557 92.48 SPRIN MWSI_ET 11.2
117 11557 92.48 SPRIN NRIS_ET 16.22
118 11566 33.4 FLOOD METRIC_ET 23.6
119 11566 33.4 FLOOD MWSI_ET 9.6
120 11566 33.4 FLOOD NRIS_ET 10.81
121 11567 53.89 FLOOD METRIC_ET 20.3
122 11567 53.89 FLOOD MWSI_ET 10.2
123 11567 53.89 FLOOD NRIS_ET 13.17
124 11601 39.65 SPRIN METRIC_ET 17.72
125 11601 39.65 SPRIN MWSI_ET 9.8
126 11601 39.65 SPRIN NRIS_ET 15.94
127 11603 29.39 FLOOD METRIC_ET 19.04
128 11603 29.39 FLOOD MWSI_ET 8.8
129 11603 29.39 FLOOD NRIS_ET 10.71
130 11702 6.72 SPRIN METRIC_ET 12.37
131 11702 6.72 SPRIN MWSI_ET 8.6
132 11702 6.72 SPRIN NRIS_ET 11.51
133 11703 16.17 SPRIN METRIC_ET 15.35
134 11703 16.17 SPRIN MWSI_ET 10.4
135 11703 16.17 SPRIN NRIS_ET 13.21
136 11781 56.95 SPRIN METRIC_ET 19.2
137 11781 56.95 SPRIN MWSI_ET 8.6
138 11781 56.95 SPRIN NRIS_ET 11.04
139 11961 76.95 SPRIN METRIC_ET 26.49
140 11961 76.95 SPRIN MWSI_ET 16
141 11961 76.95 SPRIN NRIS_ET 17.34
142 11963 32.34 FLOOD METRIC_ET 29.77
143 11963 32.34 FLOOD MWSI_ET 16.5
144 11963 32.34 FLOOD NRIS_ET 22.47
145 12249 37.36 SPRIN METRIC_ET 20.65
146 12249 37.36 SPRIN MWSI_ET 15.8
147 12249 37.36 SPRIN NRIS_ET 17.93
148 12266 36.19 FLOOD METRIC_ET 19.25
149 12266 36.19 FLOOD MWSI_ET 11.4
150 12266 36.19 FLOOD NRIS_ET 13.69
151 12272 36.33 SPRIN METRIC_ET 21.7
152 12272 36.33 SPRIN MWSI_ET 12.4
153 12272 36.33 SPRIN NRIS_ET 17.21
154 12275 39.6 FLOOD METRIC_ET 25.98
155 12275 39.6 FLOOD MWSI_ET 14.8
156 12275 39.6 FLOOD NRIS_ET 20.15
157 12312 58.06 SPRIN METRIC_ET 21.06
158 12312 58.06 SPRIN MWSI_ET 13.7
159 12312 58.06 SPRIN NRIS_ET 18.37
160 12314 35.88 SPRIN METRIC_ET 23.96
161 12314 35.88 SPRIN MWSI_ET 15.4
162 12314 35.88 SPRIN NRIS_ET 18.35
163 12323 8.2 FLOOD METRIC_ET 20.81
164 12323 8.2 FLOOD MWSI_ET 8.9
165 12323 8.2 FLOOD NRIS_ET 11.29
166 12330 22.59 FLOOD METRIC_ET 19.91
167 12330 22.59 FLOOD MWSI_ET 10.1
168 12330 22.59 FLOOD NRIS_ET 13.52
169 12336 34.8 SPRIN METRIC_ET 21.21
170 12336 34.8 SPRIN MWSI_ET 12.1
171 12336 34.8 SPRIN NRIS_ET 14.3
172 12338 33.26 FLOOD METRIC_ET 17.96
173 12338 33.26 FLOOD MWSI_ET 9.7
174 12338 33.26 FLOOD NRIS_ET 11.88
175 12342 118.13 SPRIN METRIC_ET 17.32
176 12342 118.13 SPRIN MWSI_ET 9.8
177 12342 118.13 SPRIN NRIS_ET 14.73
178 12395 6.7 FLOOD METRIC_ET 27.93
179 12395 6.7 FLOOD MWSI_ET 18.1
180 12395 6.7 FLOOD NRIS_ET 23.54
181 12706 58.82 SPRIN METRIC_ET 20.91
182 12706 58.82 SPRIN MWSI_ET 14.9
183 12706 58.82 SPRIN NRIS_ET 17.58
184 12710 41.52 FLOOD METRIC_ET 19.25
185 12710 41.52 FLOOD MWSI_ET 12.5
186 12710 41.52 FLOOD NRIS_ET 16.39
187 12713 8.57 FLOOD METRIC_ET 21.42
188 12713 8.57 FLOOD MWSI_ET 11.3
189 12713 8.57 FLOOD NRIS_ET 14.62
190 12714 10.53 FLOOD METRIC_ET 14.49
191 12714 10.53 FLOOD MWSI_ET 8.3
192 12714 10.53 FLOOD NRIS_ET 10.7
193 12740 29.79 FLOOD METRIC_ET 18.66
194 12740 29.79 FLOOD MWSI_ET 9.3
195 12740 29.79 FLOOD NRIS_ET 11.08
196 12742 75.46 SPRIN METRIC_ET 27.31
197 12742 75.46 SPRIN MWSI_ET 15.6
198 12742 75.46 SPRIN NRIS_ET 16.82
199 12743 10.3 FLOOD METRIC_ET 22.49
200 12743 10.3 FLOOD MWSI_ET 12.3
201 12743 10.3 FLOOD NRIS_ET 15.56
202 12755 19.04 FLOOD METRIC_ET 17.82
203 12755 19.04 FLOOD MWSI_ET 10.3
204 12755 19.04 FLOOD NRIS_ET 13.58
205 12767 39.18 SPRIN METRIC_ET 29.51
206 12767 39.18 SPRIN MWSI_ET 18.2
207 12767 39.18 SPRIN NRIS_ET 24.93
208 12790 44.02 FLOOD METRIC_ET 17.75
209 12790 44.02 FLOOD MWSI_ET 8.4
210 12790 44.02 FLOOD NRIS_ET 10.66
211 12801 9.66 SPRIN METRIC_ET 25.21
212 12801 9.66 SPRIN MWSI_ET 15.9
213 12801 9.66 SPRIN NRIS_ET 21.13
214 12808 28.54 SPRIN METRIC_ET 22.91
215 12808 28.54 SPRIN MWSI_ET 13.4
216 12808 28.54 SPRIN NRIS_ET 15.72
217 12816 25.81 FLOOD METRIC_ET 16.91
218 12816 25.81 FLOOD MWSI_ET 8.2
219 12816 25.81 FLOOD NRIS_ET 14.34
220 12827 30.18 SPRIN METRIC_ET 24.34
221 12827 30.18 SPRIN MWSI_ET 16.4
222 12827 30.18 SPRIN NRIS_ET 21.96
223 12829 6.61 SPRIN METRIC_ET 19.4
224 12829 6.61 SPRIN MWSI_ET 7.8
225 12829 6.61 SPRIN NRIS_ET 20.84
226 12830 19.62 SPRIN METRIC_ET 25.71
227 12830 19.62 SPRIN MWSI_ET 15.8
228 12830 19.62 SPRIN NRIS_ET 19.37
229 76153 5.88 FLOOD METRIC_ET 17.1
230 76153 5.88 FLOOD MWSI_ET 8
231 76153 5.88 FLOOD NRIS_ET 9.96
232 76674 16.01 FLOOD METRIC_ET 19.54
233 76674 16.01 FLOOD MWSI_ET 10.8
234 76674 16.01 FLOOD NRIS_ET 13.17
235 100761 15.89 FLOOD METRIC_ET 23.39
236 100761 15.89 FLOOD MWSI_ET 10.5
237 100761 15.89 FLOOD NRIS_ET 13.56
238 101036 29.78 SPRIN METRIC_ET 19.77
239 101036 29.78 SPRIN MWSI_ET 10.4
240 101036 29.78 SPRIN NRIS_ET 13.81

Solution
‎02-24-2017 10:06 AM
Posts: 3,805

## Re: equality of variance test for 2-way or factorial anova

I am suggesting that you create a TReaTment variable from SYS and _NAME_.

Seems like you may have a data error as I expect balance with all N's equal.

``````data flat_north_anova_T;
infile cards firstobs=2;
input obs irr_id acres sys \$ _name_ \$ et_value;
length trt \$32;
trt = catx('-',sys,_name_);
cards;
Obs IRR_ID ACRES SYS _NAME_ ET_value
1 8169 43.67 SPRIN METRIC_ET 13.09
2 8169 43.67 SPRIN MWSI_ET 13.8
3 8169 43.67 SPRIN NRIS_ET 12.88
4 8321 168.11 SPRIN METRIC_ET 27.12
5 8321 168.11 SPRIN MWSI_ET 14.8
6 8321 168.11 SPRIN NRIS_ET 17.52
7 8607 42.95 FLOOD METRIC_ET 20.03
8 8607 42.95 FLOOD MWSI_ET 10.9
9 8607 42.95 FLOOD NRIS_ET 16.82
10 8794 140.98 SPRIN METRIC_ET 23.48
11 8794 140.98 SPRIN MWSI_ET 14.4
12 8794 140.98 SPRIN NRIS_ET 17.6
13 8955 31.46 SPRIN METRIC_ET 22.97
14 8955 31.46 SPRIN MWSI_ET 12.5
15 8955 31.46 SPRIN NRIS_ET 19.48
16 9541 80.98 FLOOD METRIC_ET 19.7
17 9541 80.98 FLOOD MWSI_ET 10.1
18 9541 80.98 FLOOD NRIS_ET 15.2
19 9543 13.68 FLOOD METRIC_ET 15.13
20 9543 13.68 FLOOD MWSI_ET 8.3
21 9543 13.68 FLOOD NRIS_ET 8.88
22 9564 10.69 FLOOD METRIC_ET 23.36
23 9564 10.69 FLOOD MWSI_ET 12.1
24 9564 10.69 FLOOD NRIS_ET 14.09
25 9870 24.37 FLOOD METRIC_ET 17.7
26 9870 24.37 FLOOD MWSI_ET 8.5
27 9870 24.37 FLOOD NRIS_ET 9.95
28 9935 32.09 FLOOD METRIC_ET 24.11
29 9935 32.09 FLOOD MWSI_ET 12.5
30 9935 32.09 FLOOD NRIS_ET 15.67
31 9948 5.38 FLOOD METRIC_ET 23.23
32 9948 5.38 FLOOD MWSI_ET 13.4
33 9948 5.38 FLOOD NRIS_ET 14.73
34 10010 11.37 SPRIN METRIC_ET 22.86
35 10010 11.37 SPRIN MWSI_ET 13
36 10010 11.37 SPRIN NRIS_ET 15.81
37 10060 151.48 SPRIN METRIC_ET 24.46
38 10060 151.48 SPRIN MWSI_ET 18.8
39 10060 151.48 SPRIN NRIS_ET 22.09
40 10562 54.43 SPRIN METRIC_ET 16.26
41 10562 54.43 SPRIN MWSI_ET 11.8
42 10562 54.43 SPRIN NRIS_ET 13.94
43 10700 6.19 FLOOD METRIC_ET 18.37
44 10700 6.19 FLOOD MWSI_ET 9.7
45 10700 6.19 FLOOD NRIS_ET 14.49
46 10911 27.24 SPRIN METRIC_ET 25.99
47 10911 27.24 SPRIN MWSI_ET 14.7
48 10911 27.24 SPRIN NRIS_ET 19.22
49 10935 39.44 FLOOD METRIC_ET 15.58
50 10935 39.44 FLOOD MWSI_ET 9.7
51 10935 39.44 FLOOD NRIS_ET 15.69
52 10943 5.32 SPRIN METRIC_ET 17.16
53 10943 5.32 SPRIN MWSI_ET 8.9
54 10943 5.32 SPRIN NRIS_ET 13.86
55 10948 50.37 FLOOD METRIC_ET 20.19
56 10948 50.37 FLOOD MWSI_ET 11.4
57 10948 50.37 FLOOD NRIS_ET 13.91
58 10955 30.09 SPRIN METRIC_ET 26.97
59 10955 30.09 SPRIN MWSI_ET 17.1
60 10955 30.09 SPRIN NRIS_ET 19.23
61 11041 15.15 SPRIN METRIC_ET 21.07
62 11041 15.15 SPRIN MWSI_ET 13.1
63 11041 15.15 SPRIN NRIS_ET 17.98
64 11146 11.11 FLOOD METRIC_ET 23.56
65 11146 11.11 FLOOD MWSI_ET 14.9
66 11146 11.11 FLOOD NRIS_ET 17.52
67 11195 124 SPRIN METRIC_ET 20.95
68 11195 124 SPRIN MWSI_ET 8.8
69 11195 124 SPRIN NRIS_ET 15.44
70 11198 9 SPRIN METRIC_ET 14.2
71 11198 9 SPRIN MWSI_ET 11.6
72 11198 9 SPRIN NRIS_ET 11.8
73 11200 6.5 SPRIN METRIC_ET 28.11
74 11200 6.5 SPRIN MWSI_ET 19.9
75 11200 6.5 SPRIN NRIS_ET 24.75
76 11203 5.6 SPRIN METRIC_ET 26.96
77 11203 5.6 SPRIN MWSI_ET 20
78 11203 5.6 SPRIN NRIS_ET 28.43
79 11366 31.85 FLOOD METRIC_ET 26.85
80 11366 31.85 FLOOD MWSI_ET 18.1
81 11366 31.85 FLOOD NRIS_ET 23.11
82 11391 12.89 SPRIN METRIC_ET 22.01
83 11391 12.89 SPRIN MWSI_ET 17.5
84 11391 12.89 SPRIN NRIS_ET 16.7
85 11422 125.34 SPRIN METRIC_ET 27.88
86 11422 125.34 SPRIN MWSI_ET 21.2
87 11422 125.34 SPRIN NRIS_ET 25.39
88 11425 55.13 SPRIN METRIC_ET 20.48
89 11425 55.13 SPRIN MWSI_ET 12
90 11425 55.13 SPRIN NRIS_ET 19.47
91 11428 12.87 SPRIN METRIC_ET 21.79
92 11428 12.87 SPRIN MWSI_ET 18.5
93 11428 12.87 SPRIN NRIS_ET 22.28
94 11444 8.16 SPRIN METRIC_ET 22.51
95 11444 8.16 SPRIN MWSI_ET 12.4
96 11444 8.16 SPRIN NRIS_ET 17.96
97 11467 11.69 FLOOD METRIC_ET 16.07
98 11467 11.69 FLOOD MWSI_ET 8.7
99 11467 11.69 FLOOD NRIS_ET 12.21
100 11471 29.86 FLOOD METRIC_ET 19.37
101 11471 29.86 FLOOD MWSI_ET 13.9
102 11471 29.86 FLOOD NRIS_ET 18.1
103 11477 5.54 FLOOD METRIC_ET 19.46
104 11477 5.54 FLOOD MWSI_ET 13.3
105 11477 5.54 FLOOD NRIS_ET 17.7
106 11483 63.06 FLOOD METRIC_ET 25.24
107 11483 63.06 FLOOD MWSI_ET 15.8
108 11483 63.06 FLOOD NRIS_ET 21.53
109 11494 132.55 FLOOD METRIC_ET 24.61
110 11494 132.55 FLOOD MWSI_ET 13.6
111 11494 132.55 FLOOD NRIS_ET 15.03
112 11501 15.77 FLOOD METRIC_ET 25.84
113 11501 15.77 FLOOD MWSI_ET 17.6
114 11501 15.77 FLOOD NRIS_ET 20.37
115 11557 92.48 SPRIN METRIC_ET 19.69
116 11557 92.48 SPRIN MWSI_ET 11.2
117 11557 92.48 SPRIN NRIS_ET 16.22
118 11566 33.4 FLOOD METRIC_ET 23.6
119 11566 33.4 FLOOD MWSI_ET 9.6
120 11566 33.4 FLOOD NRIS_ET 10.81
121 11567 53.89 FLOOD METRIC_ET 20.3
122 11567 53.89 FLOOD MWSI_ET 10.2
123 11567 53.89 FLOOD NRIS_ET 13.17
124 11601 39.65 SPRIN METRIC_ET 17.72
125 11601 39.65 SPRIN MWSI_ET 9.8
126 11601 39.65 SPRIN NRIS_ET 15.94
127 11603 29.39 FLOOD METRIC_ET 19.04
128 11603 29.39 FLOOD MWSI_ET 8.8
129 11603 29.39 FLOOD NRIS_ET 10.71
130 11702 6.72 SPRIN METRIC_ET 12.37
131 11702 6.72 SPRIN MWSI_ET 8.6
132 11702 6.72 SPRIN NRIS_ET 11.51
133 11703 16.17 SPRIN METRIC_ET 15.35
134 11703 16.17 SPRIN MWSI_ET 10.4
135 11703 16.17 SPRIN NRIS_ET 13.21
136 11781 56.95 SPRIN METRIC_ET 19.2
137 11781 56.95 SPRIN MWSI_ET 8.6
138 11781 56.95 SPRIN NRIS_ET 11.04
139 11961 76.95 SPRIN METRIC_ET 26.49
140 11961 76.95 SPRIN MWSI_ET 16
141 11961 76.95 SPRIN NRIS_ET 17.34
142 11963 32.34 FLOOD METRIC_ET 29.77
143 11963 32.34 FLOOD MWSI_ET 16.5
144 11963 32.34 FLOOD NRIS_ET 22.47
145 12249 37.36 SPRIN METRIC_ET 20.65
146 12249 37.36 SPRIN MWSI_ET 15.8
147 12249 37.36 SPRIN NRIS_ET 17.93
148 12266 36.19 FLOOD METRIC_ET 19.25
149 12266 36.19 FLOOD MWSI_ET 11.4
150 12266 36.19 FLOOD NRIS_ET 13.69
151 12272 36.33 SPRIN METRIC_ET 21.7
152 12272 36.33 SPRIN MWSI_ET 12.4
153 12272 36.33 SPRIN NRIS_ET 17.21
154 12275 39.6 FLOOD METRIC_ET 25.98
155 12275 39.6 FLOOD MWSI_ET 14.8
156 12275 39.6 FLOOD NRIS_ET 20.15
157 12312 58.06 SPRIN METRIC_ET 21.06
158 12312 58.06 SPRIN MWSI_ET 13.7
159 12312 58.06 SPRIN NRIS_ET 18.37
160 12314 35.88 SPRIN METRIC_ET 23.96
161 12314 35.88 SPRIN MWSI_ET 15.4
162 12314 35.88 SPRIN NRIS_ET 18.35
163 12323 8.2 FLOOD METRIC_ET 20.81
164 12323 8.2 FLOOD MWSI_ET 8.9
165 12323 8.2 FLOOD NRIS_ET 11.29
166 12330 22.59 FLOOD METRIC_ET 19.91
167 12330 22.59 FLOOD MWSI_ET 10.1
168 12330 22.59 FLOOD NRIS_ET 13.52
169 12336 34.8 SPRIN METRIC_ET 21.21
170 12336 34.8 SPRIN MWSI_ET 12.1
171 12336 34.8 SPRIN NRIS_ET 14.3
172 12338 33.26 FLOOD METRIC_ET 17.96
173 12338 33.26 FLOOD MWSI_ET 9.7
174 12338 33.26 FLOOD NRIS_ET 11.88
175 12342 118.13 SPRIN METRIC_ET 17.32
176 12342 118.13 SPRIN MWSI_ET 9.8
177 12342 118.13 SPRIN NRIS_ET 14.73
178 12395 6.7 FLOOD METRIC_ET 27.93
179 12395 6.7 FLOOD MWSI_ET 18.1
180 12395 6.7 FLOOD NRIS_ET 23.54
181 12706 58.82 SPRIN METRIC_ET 20.91
182 12706 58.82 SPRIN MWSI_ET 14.9
183 12706 58.82 SPRIN NRIS_ET 17.58
184 12710 41.52 FLOOD METRIC_ET 19.25
185 12710 41.52 FLOOD MWSI_ET 12.5
186 12710 41.52 FLOOD NRIS_ET 16.39
187 12713 8.57 FLOOD METRIC_ET 21.42
188 12713 8.57 FLOOD MWSI_ET 11.3
189 12713 8.57 FLOOD NRIS_ET 14.62
190 12714 10.53 FLOOD METRIC_ET 14.49
191 12714 10.53 FLOOD MWSI_ET 8.3
192 12714 10.53 FLOOD NRIS_ET 10.7
193 12740 29.79 FLOOD METRIC_ET 18.66
194 12740 29.79 FLOOD MWSI_ET 9.3
195 12740 29.79 FLOOD NRIS_ET 11.08
196 12742 75.46 SPRIN METRIC_ET 27.31
197 12742 75.46 SPRIN MWSI_ET 15.6
198 12742 75.46 SPRIN NRIS_ET 16.82
199 12743 10.3 FLOOD METRIC_ET 22.49
200 12743 10.3 FLOOD MWSI_ET 12.3
201 12743 10.3 FLOOD NRIS_ET 15.56
202 12755 19.04 FLOOD METRIC_ET 17.82
203 12755 19.04 FLOOD MWSI_ET 10.3
204 12755 19.04 FLOOD NRIS_ET 13.58
205 12767 39.18 SPRIN METRIC_ET 29.51
206 12767 39.18 SPRIN MWSI_ET 18.2
207 12767 39.18 SPRIN NRIS_ET 24.93
208 12790 44.02 FLOOD METRIC_ET 17.75
209 12790 44.02 FLOOD MWSI_ET 8.4
210 12790 44.02 FLOOD NRIS_ET 10.66
211 12801 9.66 SPRIN METRIC_ET 25.21
212 12801 9.66 SPRIN MWSI_ET 15.9
213 12801 9.66 SPRIN NRIS_ET 21.13
214 12808 28.54 SPRIN METRIC_ET 22.91
215 12808 28.54 SPRIN MWSI_ET 13.4
216 12808 28.54 SPRIN NRIS_ET 15.72
217 12816 25.81 FLOOD METRIC_ET 16.91
218 12816 25.81 FLOOD MWSI_ET 8.2
219 12816 25.81 FLOOD NRIS_ET 14.34
220 12827 30.18 SPRIN METRIC_ET 24.34
221 12827 30.18 SPRIN MWSI_ET 16.4
222 12827 30.18 SPRIN NRIS_ET 21.96
223 12829 6.61 SPRIN METRIC_ET 19.4
224 12829 6.61 SPRIN MWSI_ET 7.8
225 12829 6.61 SPRIN NRIS_ET 20.84
226 12830 19.62 SPRIN METRIC_ET 25.71
227 12830 19.62 SPRIN MWSI_ET 15.8
228 12830 19.62 SPRIN NRIS_ET 19.37
229 76153 5.88 FLOOD METRIC_ET 17.1
230 76153 5.88 FLOOD MWSI_ET 8
231 76153 5.88 FLOOD NRIS_ET 9.96
232 76674 16.01 FLOOD METRIC_ET 19.54
233 76674 16.01 FLOOD MWSI_ET 10.8
234 76674 16.01 FLOOD NRIS_ET 13.17
235 100761 15.89 FLOOD METRIC_ET 23.39
236 100761 15.89 FLOOD MWSI_ET 10.5
237 100761 15.89 FLOOD NRIS_ET 13.56
238 101036 29.78 SPRIN METRIC_ET 19.77
239 101036 29.78 SPRIN MWSI_ET 10.4
240 101036 29.78 SPRIN NRIS_ET 13.81
;;;;
run;
proc print;
run;
PROC GLM DATA=flat_north_anova_T;
CLASS _name_ sys;
MODEL ET_value= _name_|sys/ SS3 ;
Means _name_*sys;
run;
PROC GLM DATA=flat_north_anova_T;
CLASS trt;
MODEL ET_value= trt / SS3 ;
Means trt / hovtest=levene;
run;
``````
Posts: 3,805

## Re: equality of variance test for 2-way or factorial anova

Hydro1 wrote:

It is not clear how to modify the dataset to work with your program-in addition it seems that LSMEANS should be used rather than MEANS ?

HOVTEST is not an option on LSMEANS statement and it doesn't matter as the MEANS=LSMEANS for one way ANOVA.

New Contributor
Posts: 4