Handbook_of_statistical_analysis_using_SAS
.pdf1.Correction factors. Box (1954) and Greenhouse and Geisser (1959) considered the effects of departures from the sphericity assumption in a repeated measures analysis of variance. They demonstrated that the extent to which a set of repeated measures departs from
the sphericity assumption can be summarised in terms of a parameter , which is a function of the variances and covariances of the repeated measures. And an estimate of this parameter can be used to decrease the degrees of freedom of F-tests for the within-subjects effect to account for deviation from sphericity. In this way, larger F-values will be needed to claim statistical significance than when the correction is not used, and thus the increased risk of falsely rejecting the null hypothesis is removed. Formulae for the correction factors are given in Everitt (2001).
2.Multivariate analysis of variance. An alternative to the use of correction factors in the analysis of repeated measures data when the sphericity assumption is judged to be inappropriate is to use multivariate analysis of variance. The advantage is that no assumptions are now made about the pattern of correlations between the repeated measurements. A disadvantage of using MANOVA for repeated measures is often stated to be the technique’s relatively low power when the assumption of compound symmetry is actually valid. However, Davidson (1972) shows that this is really only a problem with small sample sizes.
7.4Analysis Using SAS
Assuming the ASCII file 'visual.dat'is in the current directory, the data can be read in as follows:
data vision;
infile 'visual.dat' expandtabs; input idno x1-x8;
run;
The data are tab separated and the expandtabs option on the infile statement converts the tabs to spaces as the data are read, allowing a simple list input statement to be used.
The glm procedure is used for the analysis:
proc glm data=vision; model x1-x8= / nouni;
repeated eye 2, strength 4 /summary; run;
©2002 CRC Press LLC
The eight repeated measures per subject are all specified as response variables in the model statement and thus appear on the left-hand side of the equation. There are no between-subjects factors in the design, so the right-hand side of the equation is left blank. Separate univariate analyses of the eight measures are of no interest and thus the nouni option is included to suppress them.
The repeated statement specifies the within-subjects factor structure. Each factor is given a name, followed by the number of levels it has. Factor specifications are separated by commas. The order in which they occur implies a data structure in which the factors are nested from right to left; in this case, one where lens strength is nested within eye. It is also possible to specify the type of contrasts to be used for each withinsubjects factor. The default is to contrast each level of the factor with the previous. The summary option requests ANOVA tables for each contrast.
The output is shown in Display 7.2. Concentrating first on the univariate tests, we see that none of the effects — eye, strength, or eye × strength
— are significant, and this is so whichever P-value is used, unadjusted, Greenhouse and Geisser (G-G) adjusted, or Huynh-Feldt (H-F) adjusted. However, the multivariate tests have a different story to tell; now the strength factor is seen to be highly significant.
Because the strength factor is on an ordered scale, we might investigate it further using orthogonal polynomial contrasts, here a linear, quadratic, and cubic contrast.
The GLM Procedure
Number of observations 7
The GLM Procedure
Repeated Measures Analysis of Variance
Repeated Measures Level Information
Dependent Variable |
x1 |
x2 |
x3 |
x4 |
x5 |
x6 |
x7 |
x8 |
Level of eye |
1 |
1 |
1 |
1 |
2 |
2 |
2 |
2 |
Level of strength |
1 |
2 |
3 |
4 |
1 |
2 |
3 |
4 |
Manova Test Criteria and Exact F Statistics for the Hypothesis of no eye Effect
H = Type III SSCP Matrix for eye E = Error SSCP Matrix
S=1 M=-0.5 N=2
©2002 CRC Press LLC
Statistic |
Value |
F Value |
Num DF |
Den DF |
Pr > F |
||
Wilks' Lambda |
0.88499801 |
|
0.78 |
1 |
6 |
0.4112 |
|
Pillai's Trace |
0.11500199 |
|
0.78 |
1 |
6 |
0.4112 |
|
Hotelling-Lawley Trace |
0.12994604 |
|
0.78 |
1 |
6 |
0.4112 |
|
Roy's Greatest Root |
0.12994604 |
|
0.78 |
1 |
6 |
0.4112 |
|
Manova Test Criteria and Exact F Statistics for the Hypothesis of no |
|||||||
|
|
strength Effect |
|
|
|
||
H = Type III SSCP Matrix for strength |
|
|
|||||
|
E = Error SSCP Matrix |
|
|
||||
|
S=1 |
M=0.5 |
N=1 |
|
|
||
Statistic |
|
Value |
F Value |
Num DF |
Den DF |
Pr > F |
|
Wilks' Lambda |
0.05841945 |
|
21.49 |
3 |
4 |
0.0063 |
|
Pillai's Trace |
0.94158055 |
|
21.49 |
3 |
4 |
0.0063 |
|
Hotelling-Lawley Trace |
16.11758703 21.49 |
3 |
4 |
0.0063 |
|||
Roy's Greatest Root |
16.11758703 |
|
21.49 |
3 |
4 |
0.0063 |
Manova Test Criteria and Exact F Statistics for the Hypothesis of no eye* strength Effect
H = Type III SSCP Matrix for eye*strength E = Error SSCP Matrix
|
S=1 |
M=0.5 |
N=1 |
|
|
||
Statistic |
Value |
|
F Value |
Num DF |
Den DF |
Pr > F |
|
Wilks' Lambda |
0.70709691 |
|
0.55 |
3 |
4 |
0.6733 |
|
Pillai's Trace |
0.29290309 |
|
0.55 |
3 |
4 |
0.6733 |
|
Hotelling-Lawley Trace |
0.41423331 |
|
0.55 |
3 |
4 |
0.6733 |
|
Roy's Greatest Root |
0.41423331 |
|
0.55 |
3 |
4 |
0.6733 |
The GLM Procedure
Repeated Measures Analysis of Variance Univariate Tests of Hypotheses for Within Subject Effects
Source |
DF |
Type III SS |
Mean Square |
F Value |
Pr > F |
|
eye |
1 |
46 |
.4464286 |
46.4464286 |
0.78 |
0.4112 |
Error(eye) |
6 |
357 |
.4285714 |
59.5714286 |
|
|
©2002 CRC Press LLC
|
|
|
|
|
|
Adj Pr > F |
|
Source |
DF |
Type III SS |
Mean Square |
F Value |
Pr > F |
G – G |
H - F |
strength |
3 |
140.7678571 |
46.9226190 |
2.25 |
0.1177 |
0.1665 |
0.1528 |
Error(strength) |
18 |
375.8571429 |
20.8809524 |
|
|
|
|
|
Greenhouse-Geisser Epsilon |
0.4966 |
|
|
||||
|
Huynh-Feldt Epsilon |
0.6229 |
|
|
||||
|
|
|
|
|
|
|
Adj Pr > F |
|
Source |
DF |
Type III SS |
Mean Square |
F Value |
Pr > F |
G – G |
H - F |
|
eye*strength |
3 |
40 |
.6250000 |
13.5416667 |
1.06 |
0.3925 |
0.3700 |
0.3819 |
Error(eye*strength) |
18 |
231 |
.0000000 |
12.8333333 |
|
|
|
|
|
Greenhouse-Geisser Epsilon |
0.5493 |
|
|
||||
|
Huynh-Feldt Epsilon |
0.7303 |
|
|
The GLM Procedure
Repeated Measures Analysis of Variance
Analysis of Variance of Contrast Variables
eye_N represents the contrast between the nth level of eye and the last
Contrast Variable: eye_1
Source |
DF |
Type III SS |
Mean Square |
F Value |
Pr > F |
|
Mean |
1 |
371 |
.571429 |
371.571429 |
0.78 |
0.4112 |
Error |
6 |
2859 |
.428571 |
476.571429 |
|
|
The GLM Procedure
Repeated Measures Analysis of Variance
Analysis of Variance of Contrast Variables
strength_N represents the contrast between the nth level of strength and the last
Contrast Variable: strength_1
Source |
DF |
Type III SS |
Mean Square |
F Value |
Pr > F |
|
Mean |
1 |
302.2857143 |
302 |
.2857143 |
5.64 |
0.0552 |
Error |
6 |
321.7142857 |
53 |
.6190476 |
|
|
©2002 CRC Press LLC
Contrast Variable: strength_2 |
|
|
|
|
||
Source |
DF |
Type III SS |
Mean Square |
F Value |
Pr > F |
|
Mean |
1 |
175.0000000 |
175 |
.0000000 |
3.55 |
0.1086 |
Error |
6 |
296.0000000 |
49 |
.3333333 |
|
|
Contrast Variable: strength_3 |
|
|
|
|
||
Source |
DF |
Type III SS |
Mean Square |
F Value |
Pr > F |
|
Mean |
1 |
514.2857143 |
514 |
.2857143 |
5.57 |
0.0562 |
Error |
6 |
553.7142857 |
92 |
.2857143 |
|
|
The GLM Procedure
Repeated Measures Analysis of Variance
Analysis of Variance of Contrast Variables
eye_N represents the contrast between the nth level of eye and the last strength_N represents the contrast between the nth level of strength and the last
Contrast Variable: eye_1*strength_1
Source |
DF |
Type III SS |
Mean Square |
F Value |
Pr > F |
||
Mean |
1 |
9 |
.14285714 |
9 |
.14285714 |
0.60 |
0.4667 |
Error |
6 |
90 |
.85714286 |
15 |
.14285714 |
|
|
Contrast Variable: eye_1*strength_2
Source |
DF |
Type III SS |
Mean Square |
F Value |
Pr > F |
|
Mean |
1 |
11 |
.5714286 |
11.5714286 |
0.40 |
0.5480 |
Error |
6 |
171 |
.4285714 |
28.5714286 |
|
|
Contrast Variable: eye_1*strength_3
Source |
DF |
Type III SS |
Mean Square |
F Value |
Pr > F |
|
Mean |
1 |
146.2857143 |
146 |
.2857143 |
1.79 |
0.2291 |
Error |
6 |
489.7142857 |
81 |
.6190476 |
|
|
Display 7.2
©2002 CRC Press LLC
Polynomial contrasts for lens strength can be obtained by re-submitting the previous glm step with the following repeated statement:
repeated eye 2, strength 4 (1 3 6 10) polynomial /summary;
The specification of the lens strength factor has been expanded: numeric values for the four levels of lens strength have been specified in parentheses and orthogonal polynomial contrasts requested. The values specified will be used as spacings in the calculation of the polynomials.
The edited results are shown in Display 7.3. None of the contrasts are significant, although it must be remembered that the sample size here is small, so that the tests are not very powerful. The difference between the multivariate and univariate tests might also be due to the covariance structure departing from the univariate assumption of compound symmetry. Interested readers might want to examine this possibility.
The GLM Procedure
Number of observations 7
The GLM Procedure
Repeated Measures Analysis of Variance
Repeated Measures Level Information
Dependent Variable |
x1 |
x2 |
x3 |
x4 |
x5 |
x6 |
x7 |
x8 |
Level of eye |
1 |
1 |
1 |
1 |
2 |
2 |
2 |
2 |
Level of strength |
1 |
3 |
6 |
10 |
1 |
3 |
6 |
10 |
Manova Test Criteria and Exact F Statistics for the Hypothesis of no eye Effect
H = Type III SSCP Matrix for eye E = Error SSCP Matrix
|
S=1 |
M=-0.5 |
N=2 |
|
|
|
Statistic |
|
Value |
F Value |
Num DF |
Den DF |
Pr > F |
Wilks' Lambda |
0.88499801 |
0.78 |
1 |
6 |
0.4112 |
|
Pillai's Trace |
0.11500199 |
0.78 |
1 |
6 |
0.4112 |
|
Hotelling-Lawley Trace |
0.12994604 |
0.78 |
1 |
6 |
0.4112 |
|
Roy's Greatest Root |
0.12994604 |
0.78 |
1 |
6 |
0.4112 |
Manova Test Criteria and Exact F Statistics for the Hypothesis of no strength Effect
H = Type III SSCP Matrix for strength E = Error SSCP Matrix
S=1 M=0.5 N=1
©2002 CRC Press LLC
Statistic |
|
Value |
F Value |
Num DF |
Den DF |
Pr > F |
Wilks' Lambda |
0 |
.05841945 |
21.49 |
3 |
4 |
0.0063 |
Pillai's Trace |
0 |
.94158055 21.49 |
3 |
4 |
0.0063 |
|
Hotelling-Lawley Trace |
16.11758703 |
21.49 |
3 |
4 |
0.0063 |
|
Roy's Greatest Root |
16 |
.11758703 |
21.49 |
3 |
4 |
0.0063 |
Manova Test Criteria and Exact F Statistics for the Hypothesis of no eye* strength Effect
H = Type III SSCP Matrix for eye*strength E = Error SSCP Matrix
|
S=1 |
M=0.5 |
N=1 |
|
|
||
Statistic |
|
Value |
F Value |
Num DF |
Den DF |
Pr > F |
|
Wilks' Lambda |
0.70709691 |
|
0.55 |
3 |
4 |
0.6733 |
|
Pillai's Trace |
0.29290309 |
|
0.55 |
3 |
4 |
0.6733 |
|
Hotelling-Lawley Trace |
0.41423331 |
|
0.55 |
3 |
4 |
0.6733 |
|
Roy's Greatest Root |
0.41423331 |
|
0.55 |
3 |
4 |
0.6733 |
The GLM Procedure
Repeated Measures Analysis of Variance Univariate Tests of Hypotheses for Within Subject Effects
Source |
DF |
Type III SS |
Mean Square |
F Value |
Pr > F |
|
eye |
1 |
46 |
.4464286 |
46.4464286 |
0.78 |
0.4112 |
Error(eye) |
6 |
357 |
.4285714 |
59.5714286 |
|
|
|
|
|
|
|
|
Adj Pr > F |
|
Source |
DF |
Type III SS |
Mean Square |
F Value |
Pr > F |
G - G |
H - F |
strength |
3 |
140.7678571 |
46.9226190 |
2.25 |
0.1177 |
0.1665 |
0.1528 |
Error(strength) |
18 |
375.8571429 |
20.8809524 |
|
|
|
|
|
Greenhouse-Geisser Epsilon |
0.4966 |
|
|
||||
|
Huynh-Feldt Epsilon |
0.6229 |
|
|
||||
|
|
|
|
|
|
|
Adj Pr > F |
|
Source |
DF |
Type III SS |
Mean Square |
F Value |
Pr > F |
G - G |
H - F |
|
eye*strength |
3 |
40 |
.6250000 |
13.5416667 |
1.06 |
0.3925 |
0.3700 |
0.3819 |
Error(eye*strength) |
18 |
231 |
.0000000 |
12.8333333 |
|
|
|
|
©2002 CRC Press LLC
Greenhouse-Geisser Epsilon |
0.5493 |
Huynh-Feldt Epsilon |
0.7303 |
The GLM Procedure
Repeated Measures Analysis of Variance
Analysis of Variance of Contrast Variables
eye_N represents the contrast between the nth level of eye and the last
Contrast Variable: eye_1
Source |
DF |
Type III SS |
Mean Square |
F Value |
Pr > F |
|
Mean |
1 |
371 |
.571429 |
371.571429 |
0.78 |
0.4112 |
Error |
6 |
2859 |
.428571 |
476.571429 |
|
|
The GLM Procedure
Repeated Measures Analysis of Variance
Analysis of Variance of Contrast Variables
strength_N represents the nth degree polynomial contrast for strength
Contrast Variable: strength_1
Source |
DF |
Type III SS |
Mean Square |
F Value |
Pr > F |
|
Mean |
1 |
116.8819876 |
116 |
.8819876 |
2.78 |
0.1468 |
Error |
6 |
252.6832298 |
42 |
.1138716 |
|
|
Contrast Variable: strength_2
Source |
DF |
Type III SS |
Mean Square |
F Value |
Pr > F |
|
Mean |
1 |
97 |
.9520622 |
97.9520622 |
1.50 |
0.2672 |
Error |
6 |
393 |
.0310559 |
65.5051760 |
|
|
Contrast Variable: strength_3
Source |
DF |
Type III SS |
Mean Square |
F Value |
Pr > F |
|
Mean |
1 |
66 |
.7016645 |
66.7016645 |
3.78 |
0.1000 |
Error |
6 |
106 |
.0000000 |
17.6666667 |
|
|
©2002 CRC Press LLC
The GLM Procedure
Repeated Measures Analysis of Variance
Analysis of Variance of Contrast Variables
eye_N represents the contrast between the nth level of eye and the last strength_N represents the nth degree polynomial contrast for strength
Contrast Variable: eye_1*strength_1
Source |
DF |
Type III SS |
Mean Square |
F Value |
Pr > F |
||
Mean |
1 |
1 |
.00621118 |
1 |
.00621118 |
0.08 |
0.7857 |
Error |
6 |
74 |
.64596273 |
12 |
.44099379 |
|
|
Contrast Variable: eye_1*strength_2
Source |
DF |
Type III SS |
Mean Square |
F Value |
Pr > F |
|
Mean |
1 |
56 |
.0809939 |
56.0809939 |
1.27 |
0.3029 |
Error |
6 |
265 |
.0789321 |
44.1798220 |
|
|
Contrast Variable: eye_1*strength_3
Source |
DF |
Type III SS |
Mean Square |
F Value |
Pr > F |
|
Mean |
1 |
24 |
.1627950 |
24.1627950 |
1.19 |
0.3180 |
Error |
6 |
122 |
.2751052 |
20.3791842 |
|
|
Display 7.3
Exercises
7.1Plot the left and right eye means for the different lens strengths. Include standard error bias on the plot.
7.2Examine the raw data graphically in some way to assess whether there is any evidence of outliers. If there is repeat the analyses described in the text.
7.3Find the correlations between the repeated measures for the data used in this chapter. Does the pattern of the observed correlations lead to an explanation for the different results produced by the univariate and multivariate treatment of these data?
©2002 CRC Press LLC
Chapter 8
Logistic Regression:
Psychiatric Screening,
Plasma Proteins, and
Danish Do-It-Yourself
8.1 Description of Data
This chapter examines three data sets. The first, shown in Display 8.1, arises from a study of a psychiatric screening questionnaire called the GHQ (General Health Questionnaire; see Goldberg [1972]). Here, the question of interest is how “caseness” is related to gender and GHQ score.
The second data set, shown in Display 8.2, was collected to examine the extent to which erythrocyte sedimentation rate (ESR) (i.e., the rate at which red blood cells [erythocytes] settle out of suspension in blood plasma) is related to two plasma proteins: fibrinogen and γ -globulin, both measured in gm/l. The ESR for a “healthy” individual should be less than 20 mm/h and, because the absolute value of ESR is relatively unimportant, the response variable used here denotes whether or not this is the case. A response of zero signifies a healthy individual (ESR < 20), while a response of unity refers to an unhealthy individual (ESR ≥ 20). The aim of the analysis for these data is to determine the strength of any relationship between the ESR level and the levels of the two plasmas.
©2002 CRC Press LLC