《Using SPSS, Handout 13 Twoway RepeatedMeasures ANOVA.doc》由会员分享,可在线阅读,更多相关《Using SPSS, Handout 13 Twoway RepeatedMeasures ANOVA.doc(9页珍藏版)》请在三一办公上搜索。
1、Research Methods II: Spring Term 2002Using SPSS: Two-way Repeated-Measures ANOVA:Suppose we have an experiment in which there are two independent variables: time of day at which subjects are tested (with two levels: morning and afternoon) and amount of caffeine consumption (with three levels: low, m
2、edium and high). Subjects are given a memory test under all permutations of these two variables. In other words, each subjects performance is tested six times: after low, medium and high doses of caffeine in the morning, and after low, medium and high doses of caffeine in the afternoon. (Each subjec
3、t would receive these six conditions in a different random order, to avoid systematic effects of practice, etc.) A two-way repeated-measures ANOVA is the appropriate test in these circumstances.1. Entering the Data:Entering the data is a little more complicated than with previous ANOVAs. (Or rather,
4、 its a bit more complicated to explain: once you get the idea of whats required, its not too difficult to do). Basically, we have to use a separate column for the data that come from each permutation of our two variables.Assigning codes to the various conditions:In this example, we have two IVs: tim
5、e of day and caffeine consumption. Time of day has two levels: morning, and afternoon. Caffeine consumption has three levels: low, medium and high. We need to give code-numbers to the IVs, and to the levels of each IV, to help SPSS identify them correctly. (a) Lets call time of day variable 1, and c
6、affeine consumption variable 2. (b) For the levels of time of day, lets use a 1 to identify morning, and a 2 to identify afternoon.(c) For the levels of caffeine consumption, lets use a 1 to identify low. a 2 to identify medium and a 3 to identify high.Now each combination of code-numbers identifies
7、 a specific level of one or other of our variables, as follows:1,1 means time of day: morning; caffeine consumption: low. 1,2 means time of day: morning; caffeine consumption: medium. 1,3 means time of day: morning; caffeine consumption: high.2,1 means time of day:afternoon; caffeine consumption: lo
8、w.2,2 means time of day: afternoon; caffeine consumption, medium.2,3 means time of day: afternoon; caffeine consumption: high. Entering the data into columns in SPSS:With a one-way repeated-measures ANOVA, we entered the data for each condition in a separate column (see Using SPSS handout 12). So, i
9、n this instance, if we were interested only in the effects of caffeine (and had not considered time of day), we would have had only three columns, for low, medium and high levels of caffeine. Now we have the additional variable of time of day and we need to include the columns for these data somehow
10、. In this example, the data would be entered in six columns, one for each permutation of caffeine and time of day. We need a separate column for each of the following: morning, low caffeine data (1,1 in our codes); morning, medium caffeine data (1,2), morning, high caffeine (1,3); afternoon, low caf
11、feine (2,1); afternoon, medium caffeine (2,2); and finally, afternoon, low caffeine (2,3). Our SPSS data-screen might look like this (as usual, Ive included a column labelled subject, to show whose data is whose, but its not required for the analysis). Notice how I have arranged the columns. First,
12、I have all the columns that relate to the morning level of my time of day IV. So, I begin with the columns which correspond to the various levels of caffeine consumption (low, medium and high) for the morning testing. Then , I have all the columns which relate to the afternoon level of the time of d
13、ay variable. (Its not strictly necessary to arrange the data like this, but it makes it easier for you to keep track of what you are doing). I would strongly advise you to label the columns with as meaningful titles as you can manage. Here, for example, its pretty obvious that amlow contains the dat
14、a for the morning testing /low caffeine dose data, pmmedium contains the data for the afternoon testing/medium caffeine dose data, and so on.Running the ANOVA:Having entered your data, do the following.(a) Click on Analyze; then click on General Linear Model; then click on Repeated Measures. The Rep
15、eated Measures Define Factor(s) dialog box:(b) For each of your IVs, you have to make entries in this box. You have to tell SPSS the name of each IV, and how many levels it has. Start with the time of day variable. Replace the words factor 1 with a more meaningful name that describes this variable -
16、 for example, testtime. Then enter the number of levels in the next box down. We have two levels of time of day, so we enter a 2 in the box. Now click on the button labelled Add, and SPSS will put a brief summary of this IV into the box beside the button. In this case, SPSS will put testtime(2) into
17、 the box, as shown below:(c) Repeat step (b) for the caffeine consumption IV. So, next to within-subject factor name, enter a label for this variable. Ive used caffeine. For this variable, there are three levels, so I have entered 3 in the next box down. Finally, click on Add to enter the details. Y
18、our dialog box will now look like this:(c) Now we have to tell SPSS which columns contain the data needed for the ANOVA. Click on the button labelled Define. The Repeated Measures Define Factor(s) dialog box disappears, and is replaced with a new, fearsome-looking one, entitled Repeated Measures .Th
19、is looks horrendous, but stay calm. Lets take it bit by bit. On the left-hand side of the dialog box is a box containing the names of the columns in your SPSS data-window. On the right-hand side, is a box which contains empty slots (shown as _?_1,1, for example). Your mission, should you choose to a
20、ccept it, is to move each column name on the left, into its correct slot on the right. This is where all that fuss about column labelling and coding pays off. Take the top slot in the right-hand box: its got (1,1) next to it. This means that this is the slot for the name of the column that represent
21、s the permutation of the first level of IV1 and the first level of IV2. In our example, this means the column containing the data for morning/low caffeine consumption (coded 1,1 earlier on). The next slot is for morning/medium caffeine consumption (which we coded as 1,2), and so on. Click on the slo
22、t first; then click on the appropriate column name; then click on the arrow-button between the boxes, to enter the column name into the slot. Do this for each slot in turn.Your dialog box should end up looking like this:(d) Click on Options, and then Descriptive statistics in the dialogue box, and t
23、hen Continue to return to the previous box.(e) Click on Contrasts. Click on Caffeine to highlight it. In the Change Contrasts box click on the arrow find the Repeated option; click on this, and then click on Change. Finally, click on Continue. This step is to prduce post hoc tests for Caffeine, whic
24、h has three levels. No post hoc tests are needed for Testtime, which only has two levels.(f) Click OK.The ANOVA Output:This is the output that you would get from our example. My explanations are the bold-type bracketed bits:General Linear ModelJust ignore this next table of Multivariate Tests.The ne
25、xt table tests the assumption of sphericity (see last handout for definition). Sphericity is tested separately for each effect; you should look at the associated p values (sig.) - if any is below .05, the assumption has been violated. In each case, there is no violation of the sphericity assumption,
26、 so we do not need to consider any corrections to the F tests for each effect.Here is the Analysis of Variance summary table. For each effect you can look at just the row labelled Sphericity Assumed. Remember that if the sphericity assumption had been violated for any effect, you would have looked a
27、t the row labelled Huyn-Feldt for that effect. Note also that each effect has its own associated error term. The error for each effect is its interaction with subjects; e.g. the error for testtime is the interaction of testtime with subjects, as explained in the lecture. First in the table, there is
28、 the main effect of testtime: was test performance significantly affected by whether subjects were tested in the morning or the afternoon (averaging over caffeine dosage)? In this example, there is a highly significant F-ratio - time of testing had a significant effect on performance. Next there is
29、the main effect for caffeine: was test performance significantly affected by the amount of caffeine subjects received (averaging over time of testing)? In fact, we have a highly significant effect of caffeine consumption on memory performance. Finally, the interaction between your IVs: do the effect
30、s of one IV depend on the level of the other IV? In this example, there is a significant interaction between time of testing and caffeine consumption: the effects of caffeine depend on what time of day people were tested.The following table produces various post hoc tests. No post hoc tested is need
31、ed for testtime; in fact, notice that the test it performs on testtime produces exactly the same F value and p value as in the ANOVA above. So reporting it again here is just a way SPSS has of wasting space. In fact, ignore any of the rows which mention testtime. You may be interested in the post ho
32、c tests it performs for caffeine (remember: you would only look at these if the main effect of caffeine was significant); SPSS presents you with tests of successive levels, i.e. low with medium and medium with high. This may be sufficient for your purposes, or you may want all possible pair-wise com
33、parisons - see below for how to compute these. The following part of the output tests to see if the overall mean (of all your data) is significantly different from zero; this is not very interesting in this case.Post hoc testsYou may wish to analyze two effects further: the main effect of caffeine a
34、nd the interaction. Taking these cases in turn:Interpreting a main effectFor the main effect of testtime there is no further inferential test that needs to be done: Subjects overall have different levels of performance in the morning rather than the afternoon and thats that. There are only two level
35、s and we know there is a difference so there is nothing more to be tested. However, the main effect of caffeine indicates that at least one level is different from at least one other, but we dont know what the pattern is. So we may like to perform post hoc tests to determine the pattern. Remember yo
36、u would go on to perform these post hoc tests ONLY IF the main effect was significant. But just because the main effect is significant, it does not mean you have to perform the post hoc tests just do so if you are interested in the pattern. You might argue that since the main effect is qualified by
37、an interaction, that means the pattern is an average of two possibly quite different patterns (one in the morning and one in the afternoon) and you are not interested in the average of two quite different things. So then you would just go on to interpret the interaction.Assuming you did want to anal
38、yze the main effect further, how would you do it? There are a number of techniques you could do, and this is something you will want to check with your supervisor if it comes up in your project. You could use the same procedure as we used for the one-way repeated measures case. That is, you perform
39、comparisons between each possible pair of levels: low with medium, low with high, and medium with high. The complication in this case compared with the one-way case is that we want to perform these comparisons averaging over time of day. Heres the quickest way of getting SPSS to do this. Click once
40、more on:Analyze General Linear Model Repeated Measurestell SPSS that you have two factors, but this time say that they only have two levels each. For caffeine enter the two levels as low and medium. Just enter four columns when it asks you to match columns to combinations of IVs: morning low, mornin
41、g medium, afternoon low, afternoon medium. In the results, the ONLY effect you are interested in is the main effect of caffeine. This is a test of whether low is different from medium, averaging over time of day. Ignore the results for all other effects in this output. Repeat the procedure for the o
42、ther two pair-wise comparisons. Interpreting an interactionJust as for the second module, if you have a significant interaction, you may be interested in gaining further information on the pattern of the interaction. Just as before, you could break down the interaction in two ways:1) the effect of c
43、affeine in the morning; and the effect of caffeine in the afternoon; OR2) the effect of time of day at low doses of caffeine; the effect of time of day a medium doses; and the effect of time of day at high doses.Choose ONE of these ways of breaking it down, unless you have a theory that makes import
44、ant predictions according to both ways. For (1) you would determine the simple effect of caffeine for each time of day separately.Click once more onAnalyze General Linear Model Repeated Measurestell SPSS that you have one factor, caffeine, with three levels. Just select the three columns for morning
45、 and run the one-way ANOVA. This is the effect of caffeine in the morning. If significant (which it is), you could perform further post hoc tests to determine the pattern of mean differences; e.g. all possible pairwise comparisons. That is, click once more onAnalyze General Linear Model Repeated Mea
46、surestell SPSS you have one factor, caffeine, with TWO levels. Select two of the levels and run the one-way ANOVA. (Note: You could have run a t-test using the related t-test command and you would get exactly the same p value out. In fact, if you squared the t-value you would get the F value. The tw
47、o procedures are equivalent when there are only two levels of a single IV.) Having conducted all possible pair-wise comparisons, determine the simple effect of caffeine for the afternoon, followed up by post hoc tests.For (2), you would determine the simple effect of time of day for each level of ca
48、ffeine. That is, you would compare morning low with afternoon low, using either related t-tests or the repeated measures one-way ANOVA; then compare morning medium with afternoon medium in the same way; and finally morning high with afternoon high.Interpreting the Results:The means for the morning sessions are lower than those for the afternoon sessions (as confirmed by the significant effect of time of testing in the ANOVA output). Also, the more caffeine, the bette