Information Technology Reference
In-Depth Information
Figure 7.33
The necessary SAS code to perform our polynomial contrasts.
Now click
Previewcode
at the bottom left of the
Least Squares
window
to display the code. To insert new code, click the
Insert Code
pushbutton
located at the top left portion of the window. Scroll down to the bar
title
<
double-click to insert code
>
directly above the
LSMEANS group/
PDIFF
ALL
line. Double click in that line. This will present you with an
EnterUserCode
window, where you can type the command code for the
planned comparisons. We have already typed this code in, as shown in
Figure 7.33.
After entering the code, click
OK
.Thisreturnsyoutothe
User Code
window where your new code can be seen if you wish once you scroll down
to the end of the file. Click
OK
to return to the
Least Squares
window,
and click
Run
to perform the analysis.
∗
7.35 OUTPUT FOR POLYNOMIAL CONTRASTS
(TREND ANALYSIS) IN SAS
The output from the three polynomial contrast analyses is presented in
the final three rows of the output in Figure 7.34. As you can see, each
is identified by the label we typed in quotation marks in the
Enter User
Code
window and each is evaluated by its own
F
ratio. Both the linear and
quadratic components yielded statistically significant effects.
These are the
probabilities of
the differences
occurring by
chance alone
for linear,
quadratic, and
cubic.
Contrast
DF
1
1
1
Contrast SS
Mean Square
F Value
Pr
>
F
linear
quadratic
cubic
219520.0000
7546.9388
3430.0000
219520.0000
7546.9388
3430.0000
165.59
5.69
2.59
<
.0001
0.0235
0.1182
Figure 7.34
Output from the polynomial contrasts analysis.