Analysis of Variance and Covariance with Repeated Measures 2V perfonns analysis of variance or covariance for a wide variety of effects and repeated-measures designs.. 2V ANOVA With Re
Trang 1Analysis of Variance and
Covariance with Repeated
Measures
2V perfonns analysis of variance or covariance for a wide variety of effects and repeated-measures designs You can analyze models that have grouping factors, within factors, or both Grouping factors are also called between-groups or whole-plot factors Within-subjects factors are also called trial, split-plot, repeated measures, or simply within factors The grouping and the within factors must be crossed (not nested) in 2V Group sizes may be unequal for combinations of grouping factors, but each subject must have a response for every combination of within factors You can analyze both com-plete and incomplete fixed-effects factorial designs, including Latin square designs, incomplete block designs, and fractional factorial designs When there are within factors, 2V will perfonn an orthogonal decomposition of the within factors in addition to the overall analysis of variance The program can also perfonn contrasts over within factors
fixed-Program 9D serves as a helpful adjunct to 2V; it can provide plots of group means and means of repeated measures, as well as repeated measures plots for individual subjects For a fixed-effects two-way analysis of variance with detailed data screening, see program 70 For mixed models with equal cell sizes, see program 8V; for unbalanced mixed models, see 3V For a multivariate
as well as a univariate approach to repeated measures analysis of variance, see program 4V When some subjects in a repeated-measures design have data missing, see program SV SV also allows alternative structures for the within-subjects covariance matrix See Volume 2 for descriptions of 3V, 4V, SV, and 8V
In this chapter, we present examples of a variety of designs for the analysis of variance and covariance with repeated and nonrepeated factors (For a general introduction to these subjects see Cox and Snell, 1981; Dunn and Clark, 1987; and Kirk, 1982.) One of the examples may be similar to your design If so, you may want to skip the discussion of the other examples We describe several examples in detail to explain the sums of squares and test statistics computed
by 2V If your example has any grouping factors, we recommend that you read
Trang 22V ANOVA With Repeated Measures
Where to Find It
Fixed Effects
Factorial Designs
(Grouping Variables
Only)
Example 2V.l, and if it has any within factors we recommend that you read the introduction to repeated measures preceding Example 2V.6 and 2V.7 The latter two examples both illustrate the same design with one grouping and one
with-in factor; with-in 2V.7, results for an orthogonal decomposition are added
Examples
Fixed Effects Factorial Designs 522
2V.1 Analysis of variance with two grouping factors 524
2V.2 Analysis of variance with two grouping factors and two covariates 527
2V.3 Latin square design 531
2V.4 Incomplete block design 532
2V.5 Fractional factorial design 534
Repeated Measures Designs 535
2V.6 One grouping and one within factor 538
2V.7 Miniplots and breaking the within factor into orthogonal components 540
2V.8 One grouping and two within factors 542
2V.9 Contrast over a within factor 547
2V.10 One grouping and one within factor with a covariate constant across trials 549
2v.n One grouping and two within factors with a covariate changing across trials 551
Special Features • Miniplots of cell means 553
• Box-Cox diagnostic plots 553
• Split-plot designs 553
• Covariates 554
• Predicted values and residuals 555
• Case weights 556
• Using the FORM command to specify the design 556
• Repeated measures for multiple dependent variables 557
• Confidence intervals for trial cell means 557
2V Commands 558
Order of Instructions 562
Summary Table 563
2V performs an analysis of variance or covariance on fixed effects factorial designs with one or more grouping factors The grouping factors must be crossed and not nested You can obtain the correct sums of squares for nested factors by addition (see Dunn and Clark, 1987, for examples of this addition), but the desired F tests are not computed
Analysis of variance is used to test null hypotheses about group means When there are two or more grouping factors, 2V tests null hypotheses about equality
of main effects for each factor, and about interactions between factors <that is, effects of combinations of factors not predictable by summing the main effects for each factor)
To introduce factorial designs, we borrow the two-way analysis of variance example from Chapter 70 (Example 70.3) The effects of sex and education on average income are assessed using data collected in a community survey The design has a 2 x 4 structure: 2 levels of sex and 4 levels of education (high
Trang 3Figure 2V.1 Miniplots of cell means for
three hypothetical situations:
(a) no interaction between sex
and education; (b) and (c)
interactions present
AN OVA With Repeated Measures 2V
school dropouts, high school graduates, college dropouts, and college ates) Our hypotheses are the same as those tested in Example 7D.3: there are
gradu-no differences in average income (I) between males and females and (2) between groups of respondents with varying levels of education We also test a third hypothesis that the effect of educational level on income is the same for males as for females; i.e., there is no interaction between sex and education Using notation /1jj to indicate the true underlying mean of the cell for sex i and educational level j, the hypotheses above also can be written as:
2, the change in average income for the males appears much larger than that for the females, etc
The hypotheses tested by 2V are not dependent on the group sizes, so the ber of subjects in each group need not be equal See Herr (1986) for a discussion
num-of the different approaches to hypothesis testing with unequal n In 2V we use what Herr calls the standard parametric model for the analysis of unbalanced factorial deSigns Computationally, the sums of squares used in testing these hypotheses are obtained by taking the difference in residual sums of squares for regression models fit with and without specific terms (See Appendix B.20 for more details, and program 4V, Volume 2, for tests of other hypotheses about differences between means.)
The analysis of variance assumes that the responses/ observations within each
of the treatment groups are normally distributed with a common variance You can use the histograms in program 7D to study the within-cell distributions and the Levene test to identify unequal variances In general, the F test is rea-sonably robust to nonnormality, provided that the shapes of the distributions are similar The F test is also robust to moderate violations of the assumption of
Trang 42V ANOVA With Repeated Measures
We include five examples in this section The first is a simple two-way analysis
of variance, with three levels of each grouping factor The second is an analysis
of variance with two covariates The third is a Latin square design The fourth
is an incomplete block design, and the fifth is a fractional factorial design
For our first example, we use 2V to analyze a two-way factorial design described in Kirk (1982, pp 353-359) A large metropolitan city agency is evalu-ating a human relations course for new police officers The agency wants to find out whether the amount of human relations training given to the officers, and the type of neighborhood to which they are assigned, affect their attitudes toward members of minority groups The dependent variable is a test score measuring the officers' attitude toward minority groups (higher scores indicate
a positive attitude) The first grouping variable is the officers' assigned beat: upper-, middle-, or lower-class neighborhood The second is the amount of human relations training they received: 5, 10, or 15 hours If we name the grouping factors beat and training, we have the following 3 x 3 design:
Beat (class)
Upper Middle Lower
5
Training (hr)
10
The formal model can be written as
Yijk = J1 + a i + 1j + (aY)ij + Eijk
15
where ai signifies the fixed effect of beat (inferences will be made only to these three types of beats), Y; Signifies the fixed effect of training time, and (aY)ij the possible interaction of beat and training time Eijk is the random deviation of Yijk
from the population mean response for each combination of beat and training time and is assumed to be normally distributed
We organize our data by writing one record for each officer with four entries:
an ID number, codes to indicate type of neighborhood and length of training received, and attitude score (for a complete listing of the data, see Appendix D)
In Input 2V.l, the INPUT and VARIABLE paragraphs are common to all BMDP programs and are described in Chapters 3 and 4 The FILE command tells the program where to find the data and is used on systems like VAX and the IBM
Pc For IBM mainframes see UNIT, Chapter 3 The GROUP paragraph (see Chapter 5) identifies the grouping factors and assigns names to the levels of the factors, in this case for BEAT and TRAINING
A DESIGN paragraph is required in 2V to specify the dependent variables to be analyzed Here the DEPENDENT variable is ATTITUDE toward minority groups
Trang 62V ANOVA With Repeated Measures
[1] Prints the first ten cases of data Group names are printed if specified
[2] Number of cases read Only cases containing acceptable values for all ables specified in the GROUP paragraph are used An acceptable value is one that is not missing or out of range In addition, if CODES are specified for any GROUPING factor, a case is included only if the value of the GROUP-ING factor is equal to a specified CODE
vari-[3] The grouping information is printed as interpreted from the codes and names specified in the GROUP paragraph
[4] This table gives all deSCriptive statistics divided by group This table includes:
[6] Frequency of observations in each cell The panel shows that the number of subjects in each of the nine groups is five
[7] The mean, frequency, and standard deviation for each cell of the dependent variable Higher values are associated with more positive feelings toward minority groups You can see that within each of the three beats, groups with more hours of human relations training have higher scores Further, the highest attitude scores are found in groups in the lower-class beat with the two higher levels of human relations training This suggests that there may be an interaction between the police beat and length of training
[8] The analysis of variance table, with the sum of squares, degrees of freedom, mean square, F ratio, and associated p-value for each effect in the design In this case, both the main effect of length of training and the interaction are highly Significant (p-values much less than 01) When the interaction is sig-nificant, caution must be exercised in making statements about the signifi-cance of a main effect In order to understand what is happening, it is wise
Trang 7Figure 2l1.3 Attitude scores by course
length for three police beats:
lower (I), middle (m), and
upper (u) class neighborhood
Example 2V.2
Analysis of variance
with two grouping
factors and two
covariates
ANOVA With Repeated Measures 2V
to study the interaction by plotting cell means You may find that you need
to use the levels of one factor to stratify the analysis, or you can request tests of simple effects in program 4V
In Figure 2V.3 below, we use 90 to plot cell means for the attitude score on the vertical axis, and length of training on the horizontal axis Symbols indicate the type of police beat: upper class (U); middle class (M); and lower class (L) The average attitude scores for officers assigned to middle- and upper-class beats tends to change little as the length of training increases, whereas the scores of those assigned to the lower-class beat increases markedly with training The significant interaction is a result of this difference
When a background variable or pretest (independent variable or covariate) is strongly related to the outcome variable (dependent variable), an analysis of covariance may increase the precision of comparisons between treatments by reducing the within-group variability in the outcome variable due to the influ-ence of the covariates, and by adjusting for the effects of any initial imbalances between the groups
In addition to the usual assumptions required for an analysis of variance, an analYSis of covariance rests on the additional assumptions that:
1 within each group, the dependent variable has a linear relationship with
In this example, we use 2V to analyze the Exercise data (see Appendix 0) These data include pulse rates before and after exercise for 40 subjects We want
to find out whether post-exercise pulse rates differ depending on gender and smoking status after adjusting for age and pre-exercise pulse rate If we name our grouping factors sex and cigarettes, we have a 2 x 2 design:
Trang 82V ANOVA With Repeated Measures
In the DESIGN paragraph we identify PULSE_2 as the measurement analyzed (the DEPENDENT variable) The COVARIATE command identifies the covariates AGE and PUlSE_l Last, we include a PRINT paragraph to request the predicted values for each case, along with the residuals (the difference between each case's actual and predicted post-exercise pulse rates)
NAMES id sex cigarets age pulse_I
pulse_2 namel name2
LABEL namel name2
/ TRANSFORM IF (pulse_2 EO 265) THEN pulse_2 165 / GROUP
/ DESIGN / PRINT / END
VARIABLE = sex cigarets
CODES(sex cigarets) = 1 2
NAMES(sex) = male female
NAMES(cigarets) = yes no
DEPENDENT = pulse_2
COVARIATES = age pulse_I
RESIDUAL
Trang 9ANOVA With Repeated Measures 2V
Trang 102V ANOVA With Repeated Measures
[1] Interpretation of the design, with its assignment of variables (by number)
as GROUPING factors, DEPENDENT variable, and COVARIATES
[2] Cell means and standard deviations for the covariates and dependent able An examination of the means of the second covariate shows that the females had higher resting pulse rates than the males The cell means for the dependent variable, post-exercise pulse, appear higher for females, regardless of smoking status Smokers, regardless of sex, have higher post-exercise pulse rates
vari-[3] An analysis of variance table is printed, identifying the sum of squares, degrees of freedom, mean square, F ratio, p-value for each effect in the design, including covariates, and the regression coefficients for the two covariates (Since this is not an experiment in which individuals were ran-domly assigned to groups, the results must be interpreted with caution.) The model for this analysis of covariance can be written as
E(Yij) = J.l + a i + Ij + (ar)ij + f31xlij + f3r2ij
where a i and Ij represent the main effects sex and cigarette; (ar)ij the action of sex and cigarette; and f31 and /32 are the coefficients of the covari-ates age and pre-exercise pulse For this problem we test six hypotheses: (1)
inter-there are no differences in adjusted postexercise pulse due to sex; (2) there are no differences due to smoking status; (3) the effect of smoking status on the adjusted pulse rate is the same for males as for females (the interaction arin the model is zero); (4) the slope /31 for age is zero; (5) the slope f3 2 for pre-exercise pulse is zero; (6) the slopes for the combined effect of age and pre-exercise pulse are zero
The hypotheses tested are independent, but the sums of squares may not
be orthogonal For example, the sums of squares for each covariate do not add to the sums of squares for both covariates The sum of squares used in the test of each hypothesis (each analysis of variance component, each covariate by itself, and both covariates together) can be obtained as the dif-ference in the residual sums of squares of two models; one in which all covariates and effects are fitted and the other in which the effect or covari-ate(s) of interest is set to zero
In this example, after adjusting for age and pre-exercise pulse, we reject the first two hypotheses There are differences in post-exercise pulse due to sex
(p < 00005) and smoking (p = .0117) The interaction (sc) between the adjusted effects is not significant (p = .1092) The covariates are significant individually and when combined Note that the regression coefficient for post-exercise pulse on age is negative, indicating that the older subjects in this sample tended to have lower values Note that when covariates are included in the model, the line in the ANOVA table labeled MEAN is omitted
[4] The regression coefficients are estimates of the coefficients for the covariates when all effects and covariates in the model are fitted
[5] Predicted values and residuals are printed for each case The residuals are the difference between each observed value and the adjusted cell mean (for definition, see [5]) The predicted values and residuals may be saved in a BMDP File (see Chapter 8) for later use in plots or other analyses
[6] Cell means for post-exercise pulse adjusted for the linear effects of the covariates age and pre-exercise pulse The adjusted cell means provide a sample estimate of the PULSE_2 means measured at the overall mean of age and pre-exercise pulse for each cell The adjusted mean for cell (i,j) is
iLij = Yij + PI (x\ - Xli) + P2(X2 - x2ij)
where Yij' xlii' and x2ij are mea~s comRuted for cell (i,j); Xl and xA are means computed tor all cases; and f31 and /32 are the regression coetticient esti-mates The regression coefficients are assumed to be constant across groups
Trang 11Example 2V.3
Latin square design
Figure 2V.S Latin square design for rubber
compound experiment
ANOVA With Repeated Measures 2V
[7] The standard error of the adjusted cell means for the post exercise pulse variable The standard error of the mean is standard deviation of the sam-pling distribution Essentially, this is a measure of the variability of a mea-sure over repeated samplings
A Latin square design provides a way of estimating the main effects of three
different factors, each with k levels, using only k2 subjects By comparison, the
corresponding full factorial design requires Tc3 subjects Latin square designs are often used to provide balance for nuisance factors such as order of administra-tion Because interactions cannot be estimated adequately, the Latin square design rests on the assumption that interactions are negligible
We analyze data from a study evaluating the durability of four types of rubber compounds used in tires (Kirk, 1982; here we use data only from the first Latin square and add names for the autos) The other two factors in the design are type of automobile (lemon, nogo, heap, junker) and wheel position (right-front, right-rear, left-front, left-rear) The dependent variable is the thickness of tread remaining after 10,000 miles of driving A diagram of the 4 x 4 Latin square is shown in Figure 2V.5 See Example 9D.2 for a miniplot of these data
The 2V instructions for a Latin square resemble those used in Input 2V.1 for the full factorial analysis of variance Each record in the file TIRE.DAT contains information for a tire: codes for the GROUPING variables, RUBBER, WHEEL, and
AUTO, and the DEPENDENT variable TREAD These are listed in the GROUP
paragraph, as well as the NAMES assigned to the numeric CODES (1 to 4) that indicate brand of AUTO and WHEEL position
For a Latin square design we must instruct 2V to test main effects only by using either INCLUDE or EXCLUDE in the DESIGN paragraph
- Use INCLUDE to list the effects to estimate and test In this example, the main effects are RUBBER, WHEEL, and AUTO The numbers in the INCLUDE list correspond to the order of the grouping variables listed in the VARIABLE sentence of the GROUP paragraph They do not correspond to the input order in the VARIABLE paragraph
or
- Use EXCLUDE to list those effects that you do not want In this example, we want to exclude four interactions: RUBBER x WHEEL, RUBBER x AUTO, WHEEL x AUTO, and TIRE x WHEEL x AUTO We would write EXCLUDE = 12,
13, 23, 123 Notice that there are no spaces between the numbers designating the factors in each interaction
The choice between INCLUDE and EXCLUDE is Simply a matter of convenience You can specify any main effects or interactions to be included or excluded depending on the analysis you want
Trang 122V ANOVA With Repeated Measures
VARIABLE = rubber, wheel , auto
[2J The analysis of variance table We see that the treatment effect, RUBBER, is
significant (p = .0029), while the two nuisance variables are not Significant Since there is only one case per cell in this example, we have no within-cell error term; the mean square of the residuals is used as an error term to test the treatment and nuisance effects
A full factorial design may require many cases to evaluate all treatment nations However, if the experimenter is mainly interested in estimating and testing main effects plus a few lower-order interactions, and can safely assume that other effects are negligible, an incomplete block design or a fractional fac-torial (see Example 2V.5) can provide the desired information with a fraction of the sample size In these confounded factorial designs, the experimenter con-
Trang 13combi-Data Set 2V.1
Crop yield experiment
Input 2V.4
ANOVA With Repeated Measures 2V
founds specific interactions with specific main effects or other interactions We first illustrate how to specify the DESIGN paragraph for an incomplete block design
John (1971, p 135) discusses a partially confounded incomplete block design used for an agricultural experiment to test the effects of three chemicals on potato crop yield The three factors, each with two levels (yes and no), are sul-phate of ammonia, sulphate of potash, and nitrogen The dependent variable is the yield in pounds for each plot of potatoes The experiment uses eight blocks (plots of ground) Each block contains four subplots, each receiving one combi-nation of the levels of the three treatment factors In Data Set 2VJ, we record the data as five variables: the first variable is the block number, the next three are the levels (0 or 1) of the three treatment factors, and the last is the depen-dent variable (yield) Thus, four of the 23 treatment combinations are assigned
to each block in such a way that across the eight blocks each treatment nation is evaluated three times (See Example 9D.3 for a plot of these data.)
To specify the DESIGN, we submit the dependent variable:
/ DESIGN DEPENDENT = YIELD
As in the Latin square design of Example 2V.3, the effects that we want
includ-ed in the model must be specifiinclud-ed Otherwise the model has more parameters than can be estimated For the above example we might specify
INCLUDE = 1, 2, 3, 4, 23, 24, 34, 234
Using this specification, the model contains the main effect for blocking, and all main effects and interactions of the three treatment factors The model does not contain any interactions of the block effect with treatment effects (Note that the order of the factors must correspond to the order of names in the GROUP state-ment.) Alternatively, we could obtain the same analysis by specifying the effects we want to exclude from the analysis:
/ GROUP VARIABLE = block ammonia potash nitrogen
CODESCammonia potash nitrogen) 0, 1 NAMESCammonia potash nitrogen) = yes, no
Trang 142V ANOVA With Repeated Measures
Figure 2V.6 Fractional factorial deSign for
John (1971, p 154) gives a numerical example of a fractional factorial design where the dependent variable is a score representing the octane requirement of
a car, and the four independent variables are qualitative factors affecting that requirement (Although John does not specify names for the factors, we assign names to help visualize the design.) Suppose five variables are recorded for each car, including codes for
- Compression-high vs normal engine compression
- Number of Valves/Cylinder-two vs four
- Engine Size-small vs large
- Overall Weight-l900 vs 3000 lb and the dependent variable OCTANE requirement The data are displayed in Data Set 2V.2; Figure 2V.6 shows a diagram of the design
Input 2V.5 shows the design specification for the fractional factorial We name the four grouping factors COMPRESS, VALVES, SIZE, and Wf, and the depen-dent variable OCTANE In addition, we must specify the effects to be tested: all
main effects (they are confounded with third-order interactions) and three factor interactions (each is confounded with a second two-factor interaction)
two-We describe the model to 2V in the DESIGN paragraph as:
INCLUDE ARE 1 2 3 4 12 13 23
Trang 15I VARIABLE NAMES = compress, valves, size, wt, octane
I GROUP VARIABLE = compress, valves, size, wt
CODES(compress, valves, size, wt) = 0, 1 NAMES(compress) = high, normal
NAMES(valves) = '2', '4'
NAMES(size) = small, large
NAMES ( wt) = light, heavy
I DESIGN DEPEND = octane
INCLUDE = 1 2 3 4 12 13 23
I END
Because we estimate seven effects and there are only eight cases, no degrees of freedom are left to calculate an error term When we run Input 2V.5, no F ratios and p-values are printed in the analysis of variance table In such cases, the experimenter would need an independent estimate of the error to calculate the
F ratios and corresponding p-values or would need to include fewer than seven terms in the model We do not show output
In repeated measures models, the same variable is measured several times for each subject (or case) For example, suppose we record each subject's body weight every week for six weeks If there were only two weekly measurements for each subject, our analysis would be a paired-comparison t test (see program
3D) However, if we want to study three or more measures, we need to use a repeated measures analysis of variance
Several types of studies and experiments can lead to a repeated measures design These include time course or growth curve studies; an example is the amount of food left in an animal's stomach at intervals follOwing ingestion of a radiolabeled meal Another type of repeated measures study is a comparison of
treatments made in sequence In those studies, each experimental subject receives
several different stimuli, treatments, or doses and, thus, several responses are recorded for each subject A third type of repeated measures study is a true split-plot study, named for the agricultural experiments where treatments are
assigned to plots in a field Other examples are assignment of treatments to the four teats of a cow's udder, division of serum or tissue samples into aliquots, and assignment of treatments to different members of a litter
Explanation of a repeated measures analysis In order to best understand the 2V
output, it is helpful to understand the quantities that 2V derives from your data (Readers familiar with repeated measures analyses should skip to Example 2V.6.) Suppose there are only two measures, Yl and Y2 for each sub- ject You could analyze these data using a paired-comparison t test in 3D, or
you could do the calculations yourself Begin by computing the difference Yl Y2 for ellch subject, as in Table 2V.1 Then, calculate the average of the differ-
-ences, d, and the standard deviation of the differences, Sd' and put the results into the formula for the test statistic In a similar way, 2V derives values from your data and uses them in analysis of variance computations to test within-
subject changes as well as differences between groups of subjects The values derived from your data are called orthogonal polynomial components
Trang 162V ANOVA With Repeated Measures
Table 2V.1 Computing a paired-
sub-and the difference
P _ (YI -Y2)
I - .fi
(the denominator in the above equation is chosen to make the sum of squares
of the coefficients equal to one) 2V uses Po and PI to compute two analysis of
variance tables In the first table, 2V uses the values of Po to test the group effect
(this is equivalent to a two-sample t test comparing the smoker and nonsmoker
means of Po) A test that the grand mean of Po is zero Qabeled MEAN in the 2V
output) is printed at the top of this table For the second table, the values of PI are used to test whether there is no change across values of the within factor (i.e., that the mean of PI is zero) Next, a test of the interaction between the grouping factor and the within factor is reported (i.e., the equality of means for
PI between the two groups)
Suppose there is one grouping factor and a within-subject factor with 3 levels (see Table 2V.2) 2V derives three components (Po' PI' and P2):
The changes for each subject are now decomposed into two orthogonal nents: a linear component, PI' and a quadratic component, P2 In Table 2V.2, we
compo-show calculations for Po' PI' and P2 (we omit the denominator) 2V uses these
derived values to compute two analysis of variance tables:
1 Po is used to test between-group differences When there are more grouping
factors, Po is used as the dependent variable in the usual factorial design computations
2 PI and P2 are used to test differences or changes across the within-factor
and also to test the interaction of the within factor with the grouping factor
Trang 17Table 2V.2 Orthogonal polynomial break-
down for three repeated
An analysis of variance is performed for both PI and P2' but the individual
anal-yses are not printed unless ORTHOGONAL is requested in the DESIGN graph (significant results for P indicate a linear increase, or decrease, across the three measures; significance lor P2 indicates changes that follow a quadratic
para-curve) 2V always reports pooled results for PI and P2 where the sums of
squares for each effect are added Similarly, the pooled error sum of squares is the sum of the error sum of squares for Pl and P2
When each subject has four measures, the orthogonal decomposition for the within-subject tests is:
(linear)
(quadratic)
(cubic) The number of polynomials is always one less than the number of repeated measures (Note that the coefficients for the linear component are the same as those used in Example 70.5 to test a linear increase in average income across four ordered levels of education.) Again, in 2V, the sum of the four measures for each subject, POI is used in the between groups part of the design (see [4] in Output 2V.6), and Pl' P2' and P3 are pooled for the within-subject tests (see [5) in
Output 2V.6 and [5] in Output 2V.7)
Assumptions for Repeated Measures In the usual fixed effects analysis of variance model, assumptions are made that the observations are independent and normally distributed, and that the variance is the same in all cells In the repeated measures model, measures made on the same subject are usually cor-related The independence assumption is replaced by sphericity assumptions There are two ways to check the assumptions necessary for a valid test of the within factor main effects and interactions The first applies to the data them-selves, and the second, to the values from the orthogonal polynomial break-down The assumptions are satisfied if the data satisfy the conditions of com- pound symmetry That is, the measures have the same variance and the correla-
tion between the measurements for any two levels of the within factor is equal
to the correlation between any other two levels Compound symmetry is a ficient but not necessary condition A somewhat less restrictive condition is to evaluate the symmetry of the orthogonal polynomials They should be indepen-
Trang 18suf-2V ANOVA With Repeated Measures
Example 2V.6
One grouping and
one within factor
Data Set 2l1.3
Jaw growth study
dent and have equal variance This is a sufficient and necessary condition For checking equality of variance of the orthogonal polynOmials, 2V prints the sums of squares associated with each polynomial The correlation of the com-ponents is also printed (see [2] in Output 2V.6) A sphericity test found in Anderson (1958, p 259) is printed below the display The sphericity test has low power for small sample sizes For large sample sizes, the test is likely to show significance although the effect on the analysis of variance may be negli-gible This test can be very sensitive to outliers If there is a failure to meet the symmetry assumption you may
• use the F tests for the pooled orthogonal polynomials but reduce the degrees
of freedom There are two methods for reducing the degrees of freedom (see discussion of the Greenhouse-Geisser and Huynh-Feldt methods at end of Appendix B.20)
• use the single degree-of-freedom F tests associated with each individual orthogonal polynOmial because each test is valid whether or not the spheric-ity condition is satisfied The disadvantage is that the error degrees of free-dom for each test are reduced (And of course, if the levels of your within factor are not ordered, these tests may not be of interest)
• use program 5V, because it allows other structures on the covariance matrix
of the repeated measures
Note also that when the repeated measure has only two levels, the symmetry assumption is not required
In the following examples, we illustrate only designs with one grouping factor
If your repeated measures design has more than one grouping factor, refer to Examples 2V.l to 2V.5 to set up the group part of the design and BMDP
Technical Report #83 for further information
In this example, we analyze growth data for the jaws of 11 girls and 16 boys from Potthoff and Roy (1964) For each subject, the distance from the center of the pitu-itary to the pterygomaxillary fissure is recorded at the ages of 8, 10, 12, and 14 years We are interested in characterizing the growth curve and determining whether it differs between the sexes The grouping factor is sex, with two levels, and the repeated or within factor is age, with four levels The data for this study are displayed in Data Set 2V.3 For this design, there are three hypotheses:
H1 there are no differences between male and female children in jaw size
~: there are no differences in jaw size for children measured at ages 8, 10,
Trang 19Input 2V.6
Output 2V.6
ANOVA With Repeated Measures 2V
In the next example (2V.7), we show how to use orthogonal polynomials to test hypotheses about the shape of the growth curve
In Input 2V.6, the INPUT, VARIABLE, and GROUP paragraphs are the same as in other BMDP programs (see Chapters 3, 4, and 5) Each input record contains data for one child with his/her four jaw measurements and a code for sex, so
we read five variables The names of the four repeated measures are listed with
the DEPEND command The LEVEL command, used only for repeated measures
models, specifies the number of repeated measures (see Example 2V.S if you have more than one within factor)
NAMES ( sex ) = male, female
I DESIGN DEPENDE N T = age_B to age_14
I END
LEVEL = 4
NAME = age
Trang 202V AN OVA With Repeated Measures
Example 2V.7
Miniplots and
break-ing the within factor
[3] The means and standard deviations at each of the four age levels for each
of the two sexes are shown We see that jaw size increases at each age level, and that the means are greater for males than for females
[4] Analysis of variance table for Po The grouping factor, SEX, is Significant (p =
0.0054), with males having a larger average jaw measurement across ages than females
[5] Analysis of variance table for the pooled orthogonal polynomials PI' P2' P3
(See Example 2V.7 for the breakdown of the individual orthogonal nents.) The repeated or within factor, AGE, is highly significant (p <
compo-0.00005), indicating that the jaw growth differs significantly across AGE The test for the interaction of SEX with AGE is reported on the line labeled 'as' The results are marginal (p = .0781) Highly Significant results would indicate that the jaw growth pattern for boys and girls differs See addition-
al comments in Output 2V.7
If there had been a second grouping factor, for example, TREATMENT (drugs Ar B, and a placebo), tests of other interactions would be displayed; TREATMENT with AGE (labeled at), and AGE by SEX by TREATMENT (ast)
[6] The Greenhouse-Geisser and Huynh-Feldt adjusted p-values provide servative tests of the repeated measures factor Since the sphericity assump-tion was not rejected for these data, the p-values differ little from the unad-justed tail probability See the commentary on Output 2V.7 for more details
con-When the levels of the within factor are ordered-increasing ages, drug doses, etc.-you may want to test hypotheses that assess whether there is evidence of
a linear trend, whether the slopes of the groups differ, whether there is any dence of nonlinearity, and if so, whether it is quadratic or higher order If you state ORTHOGONAL in the DESIGN paragraph, 2V breaks the overall sum of squares for the within factors into orthogonal polynomials and computes an appropriate error term for each component The advantage of this approach is that the F tests for each component are valid whether or not the sphericity con-dition is satisfied The disadvantage is that error degrees of freedom for each test are reduced (Note that the individual components are appropriate when the levels of the within factor are equally spaced Example 2V.8 shows how to specify other spacings for the levels with the POINT statement.)
Trang 21evi-Input2V.7
(we change the DESIGN paragraph
of Input 2V.6 and add a PLOT
paragraph)
Output 2V.7
ANOVA With Repeated Measures 2V
In Input 2Y.7 we add ORTHOGONAL to the DESIGN paragraph and request a MINIPLOT of the cell means in the PLOT paragraph (9D has other miniplots.)
Trang 222V ANOVA With Repeated Measures
Example 2V.8
One grouping and
two within factors
[1] Error sums of squares and correlation matrix of the orthogonal components The left column lists the error sums of squares for the linear, quadratic, and cubic components, respectively If these values diverge too much from each other, then we would suspect a violation of the sphericity assumption To the right of the sums of squares is the lower off-diagonal of a correlation matrix of the components; zero or low correlations provide evidence that the data meets the sphericity condition (in our data set, the highest correla-tion is 0.286) The sphericity condition is not rejected (p = .2001)
[2] Means and standard deviations for the four levels of the dependent variable [3] Miniplot of mean jaw size across age for males and females Jaw size appears to be increasing linearly with age for both males and females, and the slope of the line appears greater for males than for females
[4] Analysis of variance table for Po This is the same as [4] in Example 2V.6 [5] Analysis of variance table for Pl' P2' and P3 Results for the individual compo-
nents are displayed in the first three panels: the notation a(1) is used for the linear component PI; a(2), the quadratic P2; and a(3), the cubic p;' The interac-tions of these components with the grouping factor, SEX, are denoted in the second line of each panel as a(l)s, a(2)s, and a(3)s Results for PI' P2' and P3
are pooled and displayed last This panel is the same as [5] in Example 2V.6 Results for the linear component of jaw size with age, a(1), are highly sig-nificant (F = 88.0, P < 00005) Thus, not only does growth change across age, but there is a highly significant linear increase Note that the sums of squares for this component (208.266) accounts for more than 99% of the total change across the within factor AGE (208.266/209.43697) If the assumption of symmetry had been violated, the results for the linear com-ponent would still be meaningful The linear AGE by SEX interaction is marginally significant (F = 5.12, P = .0326), indicating a difference in the slopes for the boys and girls across age (see plot in [3])
In this example, we analyze an experiment designed to test the effectiveness of
a new aspirin substitute for arthritis pain Three patients with hip pain and three with shoulder pain are studied (Note that the number of subjects per group need not be equal.) Each subject reports to the clinic on Monday for three weeks, when a different dose of the medication is administered (1, 2, or 4 mg, chosen so that log dose is equally spaced) Patients are tested for range of motion at times 2, 4, 6, and 10 hours after receiving the drug Hypothetical range of motion scores are shown in Data Set 2V.4