data failtime ;
input
compound $ ftime ;
cards
;
I 3.03
I 5.53
I 5.6
I 9.3
I 9.92
I 12.51
I 12.95
I 15.21
I 16.04
I 16.84
II 3.19
II 4.26
II 4.47
II 4.53
II 4.67
II 4.69
II 5.78
II 6.79
II 9.37
II 12.75
III 3.46
III 5.22
III 5.69
III 6.54
III 9.16
III 9.4
III 10.19
III 10.71
III 12.58
III 13.41
IV 5.88
IV 6.74
IV 6.9
IV 6.98
IV 7.21
IV 8.14
IV 8.59
IV 9.8
IV 12.28
IV 25.46
V 6.43
V 9.97
V 10.39
V 13.55
V 14.45
V 14.72
V 16.81
V 18.39
V 20.84
V 21.51
;
/* sort the data by
compound */
proc
sort data=failtime
;
by
compound ;
run ;
/*
calculate the mean time to fatigue failure for each compound */
proc means
data=failtime ;
by
compound ;
var
ftime ;
run ;
/*
construct side-by-side box-plots for the data */
proc univariate
data=failtime plot
;
by
compound ;
var
ftime ;
run ;
/*
compute the analysis of variance for the data */
proc glm
data=failtime ;
class
compound ;
model
ftime = compound ;
/*
compare the lead alloy compounds */
contrast
'compound I vs II' compound 1
-1 0
0 0
;
/*
compare the 2
contrast
'compound I vs III' compound 1
0 -1
0 0
;
/*
compare the lead alloys to the iron alloys */
contrast
'lead vs iron' compound 3
3 -2
-2 -2
;
/*
compare the
contrast
'US vs foreign' compound 3
-2 3
-2 -2
;
/*
compute the multiple comparisons using LSD */
means
compound / lsd ;
/*
compute the multiple comparisons using TUKEY */
means
compound / tukey ;
/*
compute the multiple comparisons using
means
compound /
quit ;