/********************* senicreg97f.sps **********************/ include 'senicread97.sps'. /* Reads & Labels data subtitle 'SENIC DATA: Dummy Var Regression = ANOVA'. Comment: Effect coding for region & medschl recode region (missing=sysmis) (1=1) (4=-1) (else=0) into re1. recode region (missing=sysmis) (2=1) (4=-1) (else=0) into re2. recode region (missing=sysmis) (3=1) (4=-1) (else=0) into re3. recode medschl (missing=sysmis) (1=1) (2=-1) into ms. Comment: Interaction terms compute rms1 = re1*ms. compute rms2 = re2*ms. compute rms3 = re3*ms. Comment: First look at cell means (predicted Ys) means variables=medschl(1,2) region(1,4) infrisk(lowest,highest) / crossbreak = infrisk by medschl by region. Comment: Regular old 2-way ANOVA anova infrisk by medschl(1,2) region(1,4) Comment: There are several ways to test for main effects and interactions in a multi-factor ANOVA. With equal or balanced cell sizes, they are all the same. SPSS offers these alternatives. UNIQUE: All effects are corrected for all other effects. SEQUENTIAL: Effects are corrected only for preceding ones. EXPERIMENTAL (the default): Main effects are corrected for other main effects. Two-way interactions are corrected for all main effects and for other 2-way interactions. Three way interactions are corrected for main effects, for 2-way interactions, and all 3-way interactions ... etc. By default, what we just did was experimental (could have said / method=unique. Now we will replicate the F-tests. It will take two runs. regression variables = infrisk re1 re2 re3 ms rms1 rms2 rms3 / statistics = defaults change / dependent = infrisk / enter ms / enter re1 re2 re3 /* Region controlling for medschl / enter rms1 to rms3. /* Interaction contr for main effects regression variables = infrisk re1 re2 re3 ms rms1 rms2 rms3 / statistics = defaults change / dependent = infrisk / enter re1 re2 re3 / enter ms /* Medschl controlling for region