Workshop notes that I created are available here– rather than trying to recreate all the diagrams in WordPress I’m attaching my Workshop notes for this particular example online.
The SAS program to be used as a starter is copied below:
proc format;
value diet 0=’aspartame’ 1=’sugar’ 2=’saccharin’;
value insulin 1=’A’ 2=’B’;
run;
data insulin;
input table diet insulin @;
format diet diet. insulin insulin.;
do rat=1 to 4;
input glucose @@;
output;
end;
cards;
1 1 1 4.90 5.16 4.42 5.29
1 1 2 4.57 4.54 4.71 4.93
1 0 1 4.40 5.47 5.01 4.78
1 0 2 4.38 4.50 4.59 4.53
1 2 1 4.91 5.15 4.63 5.15
1 2 2 4.82 4.19 4.38 4.27
2 2 2 4.05 3.83 3.93 4.36
2 2 1 4.99 4.56 4.94 5.23
2 0 2 4.38 4.31 4.72 4.60
2 0 1 5.62 4.96 4.94 5.11
2 1 2 4.71 5.01 5.03 5.04
2 1 1 5.54 5.41 5.54 5.61
3 0 1 4.80 4.55 4.68 4.69
3 0 2 4.17 4.25 4.49 4.25
3 1 1 5.40 5.01 5.00 5.58
3 1 2 3.94 4.98 3.96 4.88
3 2 1 4.67 4.47 4.50 4.90
3 2 2 4.51 4.70 4.90 4.03
;
run;
Second part of the SAS program is available here – please download after we have worked through the example together
Please note that this dataset and example comes from SAS course notes from many years ago.