* ================================================================== * FILE: mixed005 one-way ANCOVA.sps . * NOTES: Use MIXED procedure to perform one-way ANCOVA . * DATE: 30-Mar-2006 . * AUTHOR: Bruce Weaver, bweaver@lakeheadu.ca . * ================================================================== . * Use the general social survey data file . define !spss ()'C:\Program Files\SPSS\'!enddefine. get file = !spss + '1991 U.S. General Social Survey.sav' . * Perform one-way ANCOVA with the following procedures: * UNIANOVA, REGRESSION, and MIXED . UNIANOVA prestg80 BY region WITH educ /METHOD = SSTYPE(3) /EMMEANS = TABLES(region) WITH(educ=MEAN) /DESIGN = educ region . * Compute indicator variables for the 3 regions. numeric region1 to region3 (f1.0). do repeat flag = region1 to region3 / r = 1 to 3. - compute flag = (region=r). end repeat. exe. REGRESSION /STATISTICS COEFF OUTS CI R ANOVA /DEPENDENT prestg80 /METHOD=TEST (educ) (region2 region3) . MIXED prestg80 BY region WITH educ /FIXED = educ region | SSTYPE(3) /EMMEANS = TABLES(region) . * ================================================================== .