Ismail Aby Jamal

Ismail Aby Jamal
I say man, am I leader...

Thursday, January 28, 2010

Three-Way Nonorthogonal ANOVA on SPSS

Three-Way Nonorthogonal ANOVA on SPSSã

The data for this exercise are from the research which was presented in the article: Castellow, W. A., Wuensch, K. L., & Moore, C. H. (1990). Effects of physical attractiveness of the plaintiff and defendant in sexual harassment judgments, Journal of Social Behavior and Personality, 5, 547-562. The classification variables are DEATTR (experimentally manipulated physical attractiveness of the male defendant accused of sexual harassment), GENDER (gender of the mock juror), and PLATTR (experimentally manipulated physical attractiveness of the female plaintiff). The criterion variable is RATING, the mock juror’s rating of the physical attractiveness of the defendant (on a 9-point scale). Please note that this research is “quasi-experimental” in the sense that two of the predictor variables are experimentally manipulated but one (gender) is not.

Download the data file, SS1234.dat, from my data files page. Open the data file with a text editor, such as Word, just to see how the data are arranged. There is one line of data for each subject. A blank space is used as the delimiter (to separate one score from the next score). For each subject, the first score is gender (1 for male and 2 for female), the second is plattr (1 for not attractive, 2 for attractive), the third is deattr (1 for not attractive, 2 for attractive), and the fourth is rating.


Reading A Text Data File Into SPSS
Close the data file and boot up SPSS for Windows. If a dialog window comes up atop the data editor, click CANCEL. From the command bar at the top of the screen, select FILE, READ TEXT DATA. Point SPSS to the directory in which you have placed the data file, SS1234.dat. Change the Files of type parameter to Data(*.dat), select the SS1234.dat file, and click Open.

Now the Text Import Wizard comes to your assistance. The Step 1 screen looks like this:


You can see the first few lines of data in the window. Just click NEXT at this point, advancing to Step 2.


It is all too easy to get in the habit of just automatically clicking Next on Step 2, but you should carefully check to see if the wizard has correctly guessed about the format of your data file. Sometimes it guesses incorrectly, and if you do not correct it, your data will be corrupted during importation. Here the wizard has guessed correctly – the data are delimited and the first row does not contain variable names. Click Next to advance to Step 3.


The data do start on line 1, each line does represent one case (data from one subject), and you do want to read all cases, so just click NEXT again to advance to Step 4.


Blank spaces are used as the delimiters, so you just click NEXT again to advance to Step 5.


Click on the V1 tab above the first column of data, which selects that column. Change the variable name from V1 to gender, then move on to the second column, change its name to PL_Attr, then column three to DE_Attr, and column four to Rating. Then click Next to advance to Step 6..


Just click FINISH and you are returned to the data editor, where you can see the data entered into SPSS. You could ask to save the formatting specifications under a given name that you could specify in Step 1 on a future importation of a text data file with the same structure. You could ask to save the syntax, which would save in a syntax file the commands used to import these data. You could then simply run that syntax file to import the data at a later time. If you were going to use these data in SPSS again, it would be a good idea to save them in a SPSS system file (*.sav). That way you would be spared repeating this routine of reading a text file. To save the data in an SPSS system data file, just click, on the command bar at the top, FILE, SAVE AS to get this window:


Point the window at the directory where you want to save the *.sav file, give it a name (SS1234), and indicate type SPSS (*.sav). Click SAVE and you are all set.

Conducting the ANOVA
Now, let us do an ANOVA on these data. From the command bar, click ANALYZE, GENERAL LINEAR MODEL, UNIVARIATE. Select the rating variable from the list of variables and use the arrow to move it into the Dependent Variable field. Now select DE_Attr, Gender, and PL_Attr (in that order) as Fixed Factors (your “independent” variables).


Click OPTIONS and under “Estimated Marginal Means” ask to Display Means for the DE_Attr effect. Check “Compare main effects” and take the default LSD (no adjustment of alpha to control familywise error). Under Display ask for Estimates of Effect Size. There are numerous other optional statistics which you could request here.


Click CONTINUE and then OK. You get the analysis.
In the source table note the following
Type III sums of squares is the default.
The “Total” sum of squares is uncorrected for the mean – that is, it is simply the sum of the squared scores on the criterion variable.
The “Corrected Total” sums of squares is the corrected sums of squares. This is what we have commonly referred to as the total sum of squares.
The effect size estimate is partial η2. The regular η2 will smaller. For example, for the main effect of DE_Attr, partial η2 is .890. Regular η2 is 1275.998 ÷ 1476.234 = .84. For DE_Attr there is little difference between partial η2 and regular η2 because the size of the other effects is quite small. The partial η2 for the DE_Attr x Gender interaction is .091. The regular η2 for that effect is 15.894 ÷ 1476.234 = .011, much smaller than the partial η2.
If you wish to put confidence intervals on the values for partial η2, you can use my program Conf-Interval-R2-Regr.sas. If you desire confidence intervals for regular program η2 you will need to compute a modified F with the sums of squares for all other tested effects added to the error term.
Notice that SPSS provides unstandardized confidence intervals for the estimated marginal means and the differences between them.

Type I and Type II Sums of Squares
If you wanted those strange Type II sums of squares, you could repeat the analysis, but this time click the MODEL button and then, at the bottom of the window, select Type II sums of squares. If you have previously run the SS1234.sas program, you can verify that the SPSS output is the same as the SAS output for Type II sums of squares.


If you select Type I sums of squares, you will find that the SPSS output is not the same as the SAS output. When you select a full factorial model in SAS with the statement “model rating=DGP” the effects are ordered this way: D G D*G P D*P G*P D*G*P, but when you do the same with SPSS, the effects are ordered this way: D G P D*G D*P G*P D*G*P.

Copyright 2006, Karl L. Wuensch - All rights reserved.
ã Copyright 2006, Karl L. Wuensch - All rights reserved.

No comments: