Basic analysis of variance commands

Cours basic analysis of variance commands tutoriel & guide de travaux pratiques en pdf.

One-Factor Between-Subjects

Analysis of Variance
In chapter 2 you learned how to read in and transform data. In this chapter you will learn commands to analyze the simplest analysis of variance (ANOVA) design, the one-factor completely random-ized design, often called simply one-way or one-factor ANOVA. This is the appropriate analysis when participants are assigned to or belong to one of two or more groups, each participant has a score on the dependent variable, and you wish to compare the means of the various groups on this dependent variable. This chapter will not only include the commands for the overall (or “omnibus”) F test, but will also provide the techniques for testing planned contrasts, post hoc comparisons, and trend analyses. As noted in the preface and in chapter 1, throughout this book, primarily syntax will be taught, although the PAC methods that can be used with SPSS for Windows will be covered briefly at the end of each chapter. Knowing the syntax will allow the reader to access SPSS from ei-ther the mainframe or from Windows.

BASIC ANALYSIS OF VARIANCE COMMANDS

It will be useful to begin by displaying a set of hypothetical data from three groups of participants. The data appear in Fig. 3.1. It should be noted that these identical data were used as the example for the “DATA LIST” command in chapter 2, Fig. 2.1. In what follows, it is assumed that these data were already read into SPSS with a “DATA LIST” command.
In the example presented in Fig. 3.1, five different participants are in each of three groups, and there is just one grouping factor in the design. In this example, the data come from an experiment to determine if type of instruction affects false memory production. Each group of five participants first hears a list of words and is then asked to indicate if they have heard the word when it comes up on a computer screen. The number of words they say they have seen but truly have not (i.e., they have a false memory for having seen those words) constitutes the dependent variable. The first group is told to visualize the word (which is termed the Visualize condition), the second group is told to count the number of syllables of each word in the list (Count), and the last group receives no specific instructions (the control group). The study seeks to determine whether the three groups differ in the mean number of words falsely recalled.
Although all of the examples in this chapter have equal cell sizes (i.e., all of the groups have the same sample size, an equal n design), SPSS will provide the correct test statistics even if you have an unequal n design (interpretation of unequal n designs for more than one factor requires care; see chap. 4; also Keppel, 1991, chap. 13). SPSS will do this by default and you do not have to do any-thing special. When possible, all designs in this book will be analyzed with the SPSS program called MANOVA, which is the most flexible program for a variety of ANOVA designs.
The syntax, presented in Fig. 3.2, is followed by an explanation of the function of the different commands in the program. As in chapter 2, the command specifications that are to be typed into syntax are presented in capital letters and the parts of the command that are specific to the example are in lower case letters. A <RETURN> (or <ENTER>, depending on the keyboard) is assumed to follow each command (program statement). Again, the numbers in the programs that precede each of the program statements are there only for ease of reference within this text and should not be typed in.
The command “MANOVA” in line 1 tells SPSS to run the program entitled MANOVA, which conducts (multivariate) analysis of variance. Although the program MANOVA can handle multi-variate analyses (i.e., analyses with more than one dependent variable, which are covered in chap. 12), it also handles univariate analyses (i.e., analyses with only one dependent variable, which are covered in chaps. 3–11). You can thus learn one program and be able to analyze both multivariate and univariate designs.
The word directly following the “MANOVA” command is always the dependent variable you wish to analyze; in this example it is called ‘dv’. This is followed by the keyword “BY”, which in turn is followed by the name of the grouping variable, in this example, ‘facta’. In this book, this variable will be referred to as ‘facta’, ‘factb’, ‘factc’, and so on, and you should insert the name(s) of your fac-tor(s) as appropriate. The factor name is immediately followed by a pair of parentheses that contain the information on the levels of the factor. In other words, the levels have to be numbered, and the parentheses contain the range of those numbers. In this example, there are three groups (i.e., levels of ‘facta’) numbered 1, 2, and 3, so the command line reads ‘(1,3)’. If there were two groups, it would read ‘(1,2)’, if four ‘(1,4)’, and so on. Putting this all together, the command on line 1 indicates that a one-factor completely randomized analysis of variance is to be conducted on a set of scores from three different groups, identified as levels 1 through 3 of a factor called ‘facta’ (the grouping or inde-pendent variable), where the dependent variable being measured or observed is called ‘dv’.
The subcommand “OMEANS” in line 2 is actually optional, but for the sake of interpretation, virtually indispensable (recall that syntax program line numbers with a ‘d’ after them indicate that the subcommand is optional, meaning the program will run without it, but highly desirable for inter-pretation). It indicates that you want SPSS to compute and report the group mean on the dependent variable for each of the three groups (the observed means or “OMEANS”). Because it is a subcom-mand, it is indented and preceded by a “/”. Lines 3 and 4 are also optional but desirable; they tell SPSS to compute the observed power and the effect size, respectively, as will be described later. (Be-cause lines 2–4 are all optional, line 1 alone—with a period at the end for most platforms—would produce ANOVA output.) The output resulting from this syntax is shown in Fig. 3.3.
The first thing seen in the printout is a message from SPSS that the “default error term” (i.e., the term that is used as the denominator of the F ratio) has been changed to “WITHIN+RESIDUAL”. This is in contrast to previous versions of MANOVA in which the error term did not include the re-sidual but was just called “WITHIN CELLS”, which is often referred to as the within-groups or sub-jects-within-groups effect. In the full factorial designs primarily discussed in this book, these two residuals are the same, so the message may be ignored.
The next section of output provides a summary of the analysis and includes number of cases in-cluded and excluded and how many cells are in the design. Although this section will not be re-printed in this book on subsequent output, you should always check this section first in order to verify that MANOVA actually used all of your data (e.g., if you accidentally coded a person as being in group 4, this person would not be in the analysis and SPSS would have told you: “1 case rejected because of out-of-range factor values”) and that there are as many levels of your independent vari-able in the analysis as there should be.
The next output is that generated by the “OMEANS” subcommand. (There are a few lines be-ginning with “CELL NUMBER” before the “OMEANS” output that are generated in response to the keyword “HOMO” on line 4 that can be ignored.) It provides the mean, standard deviation, and N for each group (each group’s N is 5). Note that the means are 6.4, 12.6, and 6.6, respectively. Following the output generated by “OMEANS” are the “Univariate Homogeneity of Variance Tests” which were generated by the keyword “HOMO” on line 4 and will be explained later.
Next, the output provides the “Analysis of Variance” results in ANOVA summary table format. For each of the major “Sources of Variation”, the computation provides the SS (sum of squares), the DF (degrees of freedom, usually, except in that portion of output, written in lower case), and the MS (mean square). The first row lists these for the error term, “WITHIN CELLS”. The next row listed is the one associated with the independent variable, or grouping variable, in this case “FACTA”. The “Model” sums of squares and “DF” are frequently known as the between-group sum of squares and degrees of freedom (for the one-factor design, the “Model” sum of squares and degrees of freedom will be equal to that for “FACTA”). The “Total” sum of squares or degrees of freedom, in the case of the one-factor design, will equal the “WITHIN CELLS” plus the “FACTA” sum of squares or degrees of freedom, respectively.
In addition to getting the sum of squares and degrees of freedom associated with each source, you will also get the mean square (“MS”; they always equal the respective sum of squares divided by its degrees of freedom) and the F value (which was obtained by dividing the “FACTA MS” by the “WITHIN CELLS MS”). The F test and significance (“Sig”) of that test are listed on the right side of the output. In this example, the obtained F was 6.44, with a significance level of .013. Because this “Sig of F ” is less than the traditional cutoff, .05, the F test shows the difference between the three means to be statistically significant. In APA publication format, it is conventional practice to de-scribe this result as follows: The difference between the groups was significant, F(2, 12) = 6.44, p =.013.1 The first number within the parentheses is the degrees of freedom for “FACTA”, and the sec-ond is the degrees of freedom for “WITHIN CELLS”.
Note there is an F test for the effect of “FACTA”, as well as the F test for “Model”. As noted earlier, in a one-factor design, these two are the same thing. The MANOVA program also gives you “R-squared” and “Adjusted R-squared”. R squared (in this case, .518) is simply the proportion of variance in the dependent variable explained by the independent variable and is equal to sum of squares Model divided by sum of squares Total (124.13/239.73). The adjusted R2 = [1 − (1 − R2)(n − 1)/(nk)] = .437, where n = the total number of participants (15 in this case) and k = the number of groups (3 here).
Lines 3 and 4 of the program syntax generate the final output on the printout. Although, as noted previously, both of these lines of syntax are optional, it is highly recommended that they be in-cluded. Specifically, in addition to getting the overall F test, you should also obtain estimates of both power and effect size. Power is the ability to detect a false null hypothesis when it is in fact false, in other words, the probability of correctly obtaining significance. Ideally, to detect an effect if one ex-ists, your power should be .80 or above (Cohen, 1988). In this case, power did achieve that level (power = .812), under the assumption that the effect size in your sample is the true effect size.
In addition to reporting whether or not the overall F is significant, it is now standard practice to include a measure of effect size (APA, 2001). An effect size is a measure of the impact of a treatment on the dependent variable. Although various indices of effect size are commonly in use, the effect size index reported by MANOVA is partial eta squared, which provides the effect size in terms of the proportion of variance in the dependent variable explained by the grouping factor. Thus the partial eta squared will be a number between 0 and 1 inclusive, with higher scores representing more desir-able, larger effect sizes. Partial eta squared is a bit of an overestimate of the actual population effect size. The formula for partial eta squared is F/[F + (“DF WITHIN CELLS”/“DF FACTA”)]. An-other formula that provides the same answer is “SS FACTA”/“SS Total”. In the one-factor ANOVA, R squared and partial eta squared have the same value. Here the partial eta squared is .518, thus 51.80% of the variance in the dependent variable is explained by the independent variable.
If your F is nonsignificant, you can look at the power value to determine if that nonsignificance is due to inadequate power to detect the difference. Inadequate power is most easily corrected by in-creasing sample size (assuming the same effect size). In determining if an effect is nonsignificant due to a lack of power, both power and eta squared should be examined together. If eta squared is large, but power is small, then increasing sample size will help to make the effect statistically significant. However, if eta squared is small, it would be very difficult to make the effect become significant without very large sample sizes (see Cohen, 1988; Keppel, 1991, for more details about power and ef-fect sizes). You can also conduct a power analysis prior to conducting the experiment (see Keppel, 1991; Stevens, 1999) to determine what sample size is necessary to detect the effect.

TESTING THE HOMOGENEITY OF VARIANCE ASSUMPTION

One important assumption of ANOVA is the homogeneity of variance assumption, which posits that the various groups all have identical values for their population variances. To test this assump-tion, you can use a “PRINT” subcommand with the keyword “HOMO” as was done on line 4 (this can either be added onto the existing “PRINT” statement or be a new statement, e.g., on line 5, “PRINT=HOMO”). This syntax leads to printout with two variants of such a test, the “Cochran’s” and the “Bartlett-Box” tests. The assumption is violated if the “P” value is small (generally less than .05), thus for this test you want nonsignificance and if the “P” value is larger than .05, retention of the assumption is warranted. In addition to the actual tests, you will also obtain the output associ-ated with “CELL NUMBER” (located directly above the “OMEANS” output). This is simply tell-ing you how many levels of the grouping variable the assumption is being tested for. In Fig. 3.3, you can see that the “P” = .724 for Cochran’s and .830 for Bartlett-Box, thus the assumption is not vio-lated in this example. If the assumption is violated, the F test will be positively biased, thus a more stringent alpha level should be employed. Although the question of how much to adjust alpha is complicated and depends on several factors (e.g., equal vs. unequal N’s, sample size, degree of heter-ogeneity present), Keppel (1991) suggested adjusting from p = .05 to .025 when the ratio of the larg-est to smallest group variance is greater than 3 to 1.

Cours gratuitTélécharger le cours complet

Télécharger aussi :

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *