1 Moderated Multiple Regression analysis (MMR): Analysis of the effects of a moderator variable with Moderator Analysis Expert System (MAES) F.W. Siero (f.w.siero@rug.nl), Statistics and Data Analysis (SDA, Psychology), University Groningen, Grote Kruisstraat 2/I, 9712 TS Groningen, The Netherlands. You find the internet address for this software program Moderator Analysis Expert System (MAES) via http://www.rug.nl/staff/f.w.siero (see then information behind Expertise). Version December 22, 2008 ANAMOD calculates the regression of Y (criterium variable) on one or two independent variables and the dependence of this regression of a moderator variable Z. Within ANAMOD the calculations are possible for four types of designs: X: continuous variable Z: moderator variable Y: dependent variable Design 1 A: categorical variable (2 levels) Z: moderator variable Y: dependent variable Design 2 A: categorical variable (3 levels) Z: moderator variable Y: dependent variable Design 3 A: categorical variable (2 levels) B: categorical variable (2 levels) Z: moderator variable Y: dependent variable Design 4 A: categorical variable (2 levels) X: continuous variable Z: moderator variable Y: dependent variable Design 5 2 Input for ANAMOD (structure of dataset, specifications): Input for the analysis can be specified 'on line'. The program is asking for: Specification of the type of design (1, 2, 3, 4, or 5; see above). In the case of a categorical variable: specification of the reference category (comparison condition) for the other conditions within the independent variable. Filename of the datafile: check whether the filename contains no interspacing! The datafile has to be structured as follows - The datafile is written in Text-format (Ascii-format; txt-format, dos-format), separated by spaces or tabs, in 4 columns (design 1, 2, and 3) or 5 columns (design 4). Important: => the datafile has to contain no missing values or empty lines => the codes for the factors have to be integers. column 1: casenummer (is negated), column 2: scores on moderator variable Z, column 3: scores on X (design 1), or (integer) codes on factor A (design 2, 3, and 4), column 4: (integer) codes on factor B (only in design 4), column 5: scores on criteriumvariable Y. A datafile in Text-format can be created by importing or typing the data in a spreadsheet (for example Excel), then copying the data to Microsoft Word, converting the data from Table to Text (> Table > Convert), and saving that result as txt-file. - Example of a datafile: Example of a datafile for design-4 data 1 2 | 22 23 | 46 47 3.6 3.15 | 3.75 3.65 | 3.9 3.8 1 1 | 0 0 | 1 1 1 1 | 1 1 | 0 0 3.83 3 | 2.17 3 | 2 1.83 the codes for the conditions are not necessarily '0' and '1'; other values are permitted. Specification whether the criterium variable has to be standardized (yes: code 1, no: code 2). 3 The program calculates the following statistics: Regression weights, confidence intervals, and t-tests for the main- and interaction effects. Stepwise regression analysis: partitioning of the variance in Y in parts for main- and interaction effects (R2-change). ANOVA table (in the case of design 4). Mean values on Y per category of A and B for a high (MZ + 1 SD), middle (MZ ) and low value (MZ + 1 SD) on the moderator variable (in the case of design 2, 3, 4, and 5). Correlations between the independent variabelen (dummy variable(s), moderator variable Z, and the interaction terms) and the dependent variable Y. Simple slopes or simple main effects for a high (MZ + 1 SD), middle (MZ ) and low value (MZ + 1 SD) on the moderator variable: In the case of categorical variables (design 2, 3, 4, and 5) simple main effects are calculated. These effects are equal to the differences between the means on Y for a low, middle, and high value on Z. For each of these effects regression weights, confidence intervals, and significance tests are calculated. ANAMOD produces an output file and figures (see below for examples). Output file and figures can be dowloaded. The Figures produced by ANAMOD are listed below, apart for each of the four designs. Figures in ANAMOD ('d1_fig01'means: Figure 01 within Design 1). Design 1: d1_fig01: 3d-plot of the relationss between the moderator Z, the independent variable X, and the dependent variable Y. d1_fig02: Regression of the dependent variable Y on the moderator variable Z for a low [MX 1SD], middle [MX ], and high value [MX +1SD] on the independent variable X. d1_fig03: Regression of the dependent variable Y on the independent variable X for a low [MZ 1SD], middle [MZ ], and high value [MZ +1SD] on the moderator variable Z. d1_fig04: Scatterplot of the relation between the standarized estimated scores on the dependent variable Y and the standarized residuals. d1_fig05: Scatterplot of the relation between the moderator variable Z and the dependent variable Y. d1_fig06: Scatterplot of the relation between the independent variable X and the dependent variable Y. d1_fig07: Scatterplot of the relation between the moderator variable Z and the independent variable X. Design 2: d2_fig01: Regression of the dependent variable Y on the moderator variable Z for condition A1 and A2. 4 d2_fig02: Estimated mean values on Y within condition A1 and A2, apart for a low [MZ 1SD], middle [MZ], and high value [MZ +1SD] on the moderator variable Z. d2_fig03: Scatterplot of the relation between the standarized estimated scores on the dependent variable Y and the standarized residuals apart for condition A1 and A2. d2_fig04: Scatterplot of the relation between the moderator variable Z and the dependent variable Y. Design 3: d3_fig01: Regression of the dependent variable Y on the moderator variable Z for condition A1, A2, and A3. d3_fig02: Estimated mean values on Y within condition A1, A2, and A3, apart for a low [MZ -1SD], middle [MZ], and high value [MZ +1SD] on the moderator variable Z. d3_fig03: Scatterplot of the relation between the standarized estimated scores on the dependent variable Y and the standarized residuals apart for condition A1, A2, and A3. d3_fig04: Scatterplot of the relation between the moderator variable Z and the dependent variable Y. Design 4: d4_fig01: Regression of the dependent variable Y on the moderator variable Z, apart for each cell of the A(2)×B(2)-design. d4_fig02: Estimated mean values on Y for condition A1 and A2, within B1 and apart for a low [MZ 1SD], middle [MZ], and high value [MZ +1SD]on the moderator variable Z (simple main effects factor A per level of factor B) (left figure). d4_fig02: Estimated mean values on Y for condition A1 and A2, within B2 and apart for a low [MZ 1SD], middle [MZ], and high value [MZ +1SD]on the moderator variable Z (simple main effects factor A per level of factor B) (right figure). d4_fig03: Estimated mean values on Y for condition B1 and B2, within A1 and apart for a low [MZ 1SD], middle [MZ], and high value [MZ +1SD] on the moderator variable Z (simple main effects factor B per level of factor A) (left figure). d4_fig03: Estimated mean values on Y for condition B1 and B2, within A2 and apart for a low [MZ 1SD], middle [MZ], and high value [MZ +1SD] on the moderator variable Z (simple main effects factor B per level of factor A) (right figure). d4_fig04: Estimated mean values on Y for condition A1 and A2, apart for a low [MZ 1SD], middle [MZ], and high value [MZ +1SD] on the moderator variable Z (simple main effect factor A). d4_fig05: Estimated mean values on Y for condition B1 and B2, apart for a low [MZ 1SD], middle [MZ], and high value [MZ +1SD] on the moderator variable Z (simple main effect factor B). 5 d4_fig06: Scatterplot of the relation between the standarized estimated scores on the dependent variable Y and the standarized residuals apart for each cell of the A(2)×B(2)-design. d4_fig07: Scatterplot of the relation between the moderator variable Z and the dependent variable Y. Design 5: d5_fig01a: Regression of the dependent variable Y on the moderator variable Z for condition A1 and A2, for a low value [MX 1SD] on the continuous variable X. d5_fig01b: Regression of the dependent variable Y on the moderator variable Z for condition A1 and A2, for a high value [MX +1SD] on the continuous variable X. d5_fig02a: Estimated mean values on Y within condition A1 and A2 for a low value [MX 1SD] on the continuous variable X, apart for a low [MZ 1SD], middle [MZ], and high value [MZ +1SD] on the moderator variable Z. d5_fig02b: Estimated mean values on Y within condition A1 and A2, for a high value [MX +1SD] on the continuous variable X, apart for a low [MZ 1SD], middle [MZ], and high value [MZ +1SD] on the moderator variable Z. d5_fig03: Scatterplot of the relation between the standarized estimated scores on the dependent variable Y and the standarized residuals apart for condition A1 and A2. d5_fig04: Scatterplot of the relation between the moderator variable Z and the dependent variable Y. Methodological/statistical information about the moderator analysis can be found in: Cohen, J., Cohen, P., West, S.G., & Aiken, L.S. (2003). Applied multiple regression/correlation analysis for the behavioral sciences. Third edition. London: Lawrence Erlbaum Associates. Syllabus Statistiek 3 (F.W. Siero e.a.,chapter 3: Analysis of moderator effects). In Dutch: RU Groningen (2005). See below for an example of an output (figures and results) of ANAMOD (type-4 design) 6 Example of an output of ANAMOD (type-4 design): FIGURES d4_fig01: Regression of the dependent variable Y on the moderator variable Z, apart for each cell of the A(2)×B(2)-design. d4_fig02: Estimated mean values on Y for condition A1 and A2, within B1 and within B2, apart for a low [MZ -1SD], middle [MZ], and high value [MZ +1SD]on the moderator variable Z (simple main effects factor A per level of factor B) (left figure: within B1 and right figure: within B2). 7 d4_fig03: Estimated mean values on Y for condition B1 and B2, within A1 and within A2, apart for a low [MZ -1SD], middle [MZ], and high value [MZ +1SD] on the moderator variable Z (simple main effects factor B per level of factor A) (left figure: within A1 and right figure: within A2). 8 d4_fig04: Estimated mean values on Y for condition A1 and A2, apart for a low [MZ -1SD], middle [MZ], and high value [MZ +1SD] on the moderator variable Z (simple main effect factor A). d4_fig05: Estimated mean values on Y for condition B1 and B2, apart for a low [MZ -1SD], middle [MZ], and high value [MZ +1SD] on the moderator variable Z (simple main effect factor B). 9 d4_fig06: Scatterplot of the relation between the standarized estimated scores on the dependent variable Y and the standarized residuals apart for each cell of the A(2)×B(2)-design. 10 d4_fig07: Scatterplot of the relation between the moderator variable Z and the dependent variable Y. HOW TO READ THE OUTPUT OF ANAMOD? EXAMPLE AND EXPLANATION OF AN OUTPUT OF ANAMOD. MODERATOR ANALYSIS FOR AN A(2)×B(2)-DESIGN WITH ONE MODERATOR VARIABLE Z (SEE BELOW) 11 EXAMPLE OF AN OUTPUT OF ANAMOD. A MODERATOR ANALYSIS FOR AN A(2)×B(2)-DESIGN WITH ONE MODERATOR VARIABLE Z ************************************************************** MODERATED MULTIPLE REGRESSION (MMR) ANALYSIS OF EFFECTS OF MODERATOR VARIABLES Frans Siero Heymans Institute/DPMG (Statistics and Data Analysis) Psychology, University of Groningen Grote Kruisstraat 2/1, 9712 TS Groningen, The Netherlands Email: f.w.siero@rug.nl Version Nov 07, 2006 ************************************************************** Y= constante + (b1)Z + (b2)D(A) + (b3)D(B) + (b4)ZxD(A) + (b5)ZxD(B) + (b6)D(A)xD(B) + b(7) ZxD(A)xD(B) D(A): simple contrast for factor A D(B): simple contrast for factor B Import the output file from ANAMOD as a ************************************************************** textfile within Word and adjust format: leftType of design: 4 aligning and (for example) Courier new 9. Lowest condition value factor A (2 levels): 0 Highest condition value factor A (2 levels): 1 Value of the reference condition (comparison) factor A: 1 Lowest condition value factor B (2 levels): 0 Highest condition value factor BA (2 levels): 1 Value of the reference condition (comparison) factor B: 0 Path and name of datafile: moda2b2.txt Transform criterium variable to standard variable: yes='1', no='2': 1 Path and name of outputfile: uitmoda2b2.txt Data of first observation: 1.0000 3.6000 Data of last observation: 109.0000 3.6500 Number of observations: 1.0000 1.0000 3.8300 1.0000 108 0.0000 3.3300 CODES OF THE DUMMY VARIABLES IN THE REGRESSION ANALYSIS --------------------------------------------Factor Dummy variables --------------------------------------------Dummy A Dummy B Dummy A X Dummy B --------------------------------------------A1 B1 1 0 0 A1 B2 1 1 1 A2 B1 0 0 0 A2 B2 0 1 0 --------------------------------------------- When using a categorical variable, the dummyvariables contain simple (0-1) contrasts 9. REGRESSION ANALYSIS ------------------------------------------------------------------b 95% Confidence Interval Student-t p= Lower bound Upper bound ------------------------------------------------------------------Constant -0.349 -0.647 -0.050 -2.320 0.022 Moderator Z -0.433 -0.763 -0.103 -2.605 0.011 FactorA -0.152 -0.581 0.278 -0.701 0.485 FactorB 1.213 0.786 1.639 5.644 0.000 Mod x FactorA 0.344 -0.129 0.816 1.442 0.152 Mod x FactorB 0.499 0.063 0.934 2.273 0.025 FactA x FactB -0.638 -1.253 -0.024 -2.062 0.042 Z x A x B -0.887 -1.510 -0.264 -2.826 0.006 ------------------------------------------------------------------R-Square= 0.413 with F(4, 102)= 10.06, p=0.000. 12 Stepwise regression in which R-square change is equal to the extra contribution to the variance in Y. HIERARCHICAL REGRESSION ANALYSIS ---------------------------------------------------------------------------Model RRF df(hyp) df(error) p square square change ---------------------------------------------------------------------------Z 0.079 0.079 9.088 1.000 106.000 0.003 Z A 0.118 0.039 4.682 1.000 105.000 0.033 Z A B 0.335 0.217 33.893 1.000 104.000 0.000 Z A B ZxA 0.339 0.004 0.628 1.000 103.000 0.430 Z A B ZxA ZxB 0.341 0.002 0.321 1.000 102.000 0.572 Z A B ZxA ZxB AxB 0.366 0.025 4.047 1.000 101.000 0.047 Z A B ZxA ZxB AxB ZxAxB 0.413 0.047 7.984 1.000 100.000 0.006 ---------------------------------------------------------------------------Note: Z is moderator, A and B are factors (2 levels). TESTS OF BETWEEN-SUBJECTS EFFECTS ANOVA) ----------------------------------------------Source F df(hyp) df(error) p= ----------------------------------------------Constant 0.082 1.000 100.000 0.775 Moderator Z 8.886 1.000 100.000 0.004 Factor A 9.246 1.000 100.000 0.003 Factor B 33.314 1.000 100.000 0.000 ZxA 0.406 1.000 100.000 0.525 ZxB 0.122 1.000 100.000 0.727 AxB 4.252 1.000 100.000 0.042 ZxAxB 7.984 1.000 100.000 0.006 ----------------------------------------------- ANOVA-table with Fvalues for the effects of Z, A, B, and the interactions (productterms) Mean values on Y for each cell of the A(2)×B(2)-design, calculated for a low, middle, and high value on the moderator variable Z. MEANS FOR LOW, MIDDLE, AND HIGH VALUES ON THE MODERATOR VARIABLE ---------------------------------------------------------------A low A high B low B high B low B high ---------------------------------------------------------------Moderator: M-1SD -0.411 0.552 0.084 0.799 Moderator: M -0.500 0.074 -0.349 0.864 Moderator: M+1SD -0.590 -0.404 -0.782 0.929 ---------------------------------------------------------------- CORRELATIONS: ---------------------------------------------------------------------------Z A B ZxA ZxB AxB ZxAxB Y ---------------------------------------------------------------------------Z 1.000 -0.078 -0.125 0.694 0.757 -0.077 0.529 -0.281 A -0.078 1.000 0.016 -0.059 -0.008 0.580 -0.065 -0.176 B -0.125 0.016 1.000 -0.039 -0.086 0.570 -0.064 0.496 ZxA 0.694 -0.059 -0.039 1.000 0.531 -0.080 0.760 -0.217 ZxB 0.757 -0.008 -0.086 0.531 1.000 -0.056 0.698 -0.190 AxB -0.077 0.580 0.570 -0.080 -0.056 1.000 -0.112 0.077 ZxAxB 0.529 -0.065 -0.064 0.760 0.698 -0.112 1.000 -0.257 Y -0.281 -0.176 0.496 -0.217 -0.190 0.077 -0.257 1.000 ---------------------------------------------------------------------------- 13 Simple slope analysis (design type 1: X is continuous variable) or simple main analysis (design type 2, 3, and 4: categorical variable). *** SIMPLE SLOPES / SIMPLE MAIN EFFECTS *** Simple slope analysis Regression for Y (criterium) on Z (moderator) for each cell of the design **************** SIMPLE SLOPES FOR Y ON Z **************** REGRESSION FOR Y (CRITERIUM) ON Z (MODERATOR) FOR EACH COMBINATION OF LEVELS OF FACTOR A AND FACTOR B ------------------------------------------------------------------b 95% Confidence Interval Student-t p= Lower bound Upper bound ------------------------------------------------------------------For level A1 B1 -0.090 -0.394 0.215 -0.584 0.560 For level A1 B2 -0.478 -1.223 0.266 -1.273 0.206 For level A2 B1 -0.433 -0.731 -0.135 -2.881 0.005 For level A2 B2 0.065 -0.539 0.670 0.214 0.831 ------------------------------------------------------------------Note: weights for the constante: -0.500 for A1B1, 0.074 for A1B2, -0.349 for A2B1, 0.864 for A2B2 Simple simple main analysis Analysis of the differences between the mean values on Y within the two Aconditions, apart for factor B (2 levels) and the moderatorvariable Z (low, middle, high). For example: the difference A1−A2 within B = 1 (high categorical value) is in the case of a high value on Z equal to −0.404 − 0.929 (see means table above) = −1.334. We conclude with a certainty of 95% that the difference in the population will be equal to a value between −1.97 and −0.70 (t (N−k-1) = t (108−7-1)= t (100) = −4.26, p = 0.001). **************** SIMPLE SLOPES FOR Y ON A **************** REGRESSION OF Y ON FACTOR A FOR: FACTOR B = 1 (HIGH VALUE; DUMMY CODE =1);) MODERATOR Z = M(Z) + 1 STANDARD DEVIATION (HIGH VALUE) ------------------------------------------------------------------b 95% Confidence Interval Student-t p= Lower bound Upper bound ------------------------------------------------------------------Constant 0.929 0.490 1.368 4.202 0.000 M(A2)-M(A1) -1.334 -1.967 -0.701 -4.180 0.000 ------------------------------------------------------------------REGRESSION OF Y ON FACTOR A FOR: FACTOR B = 0 (LOW VALUE; DUMMY CODE =0);) MODERATOR Z = M(Z) + 1 STANDARD DEVIATION (HIGH VALUE) ------------------------------------------------------------------b 95% Confidence Interval Student-t p= Lower bound Upper bound ------------------------------------------------------------------Constant -0.782 -1.162 -0.402 -4.087 0.000 M(A2)-M(A1) 0.192 -0.408 0.792 0.635 0.527 ------------------------------------------------------------------- 14 REGRESSION OF Y ON FACTOR A FOR: FACTOR B = 1 (HIGH VALUE; DUMMY CODE =1);) MODERATOR Z = M(Z) + 0 STANDARD DEVIATION (MEAN VALUE) ------------------------------------------------------------------b 95% Confidence Interval Student-t p= Lower bound Upper bound ------------------------------------------------------------------Constant 0.864 0.559 1.168 5.630 0.000 M(A2)-M(A1) -0.790 -1.229 -0.350 -3.566 0.001 ------------------------------------------------------------------REGRESSION OF Y ON FACTOR A FOR: FACTOR B = 0 (LOW VALUE; DUMMY CODE =0);) MODERATOR Z = M(Z) + 0 STANDARD DEVIATION (MEAN VALUE) ------------------------------------------------------------------b 95% Confidence Interval Student-t p= Lower bound Upper bound ------------------------------------------------------------------Constant -0.349 -0.647 -0.050 -2.320 0.022 M(A2)-M(A1) -0.152 -0.581 0.278 -0.701 0.485 ------------------------------------------------------------------REGRESSION OF Y ON FACTOR A FOR: FACTOR B = 1 (HIGH VALUE; DUMMY CODE =1);) MODERATOR Z = M(Z) - 1 STANDARD DEVIATION (LOW VALUE) ------------------------------------------------------------------b 95% Confidence Interval Student-t p= Lower bound Upper bound ------------------------------------------------------------------Constant 0.799 0.406 1.191 4.039 0.000 M(A2)-M(A1) -0.246 -0.808 0.315 -0.870 0.386 ------------------------------------------------------------------REGRESSION OF Y ON FACTOR A FOR: FACTOR B = 0 (LOW VALUE; DUMMY CODE =0);) MODERATOR Z = M(Z) - 1 STANDARD DEVIATION (LOW VALUE) ------------------------------------------------------------------b 95% Confidence Interval Student-t p= Lower bound Upper bound ------------------------------------------------------------------Constant 0.084 -0.417 0.586 0.334 0.739 M(A2)-M(A1) -0.495 -1.170 0.180 -1.456 0.149 ------------------------------------------------------------------- (SEE BELOW) 15 Simple simple main analysis Analysis of the differences between the mean values on Y within the two Bconditions, apart for factor A (2 levels) and the moderatorvariable Z (low, middle, high). For example: the difference B2−B1 within 'A = high categorical value' is in the case of a high value on Z equal to = 0.929 − (−0.782 (see means table above) = 1.711. We conclude with a certainty of 95% that the difference in the population will be equal to a value between 1.13 and 2.29 (t (N−k-1) = t (108−7-1)= t (100) = 5.97, p = 0.001. **************** SIMPLE SLOPES FOR Y ON B **************** REGRESSION OF Y ON FACTOR B FOR: FACTOR A = 1 (HIGH VALUE; DUMMY CODE =0);) MODERATOR Z = M(Z) + 1 STANDARD DEVIATION (HIGH VALUE) ------------------------------------------------------------------b 95% Confidence Interval Student-t p= Lower bound Upper bound ------------------------------------------------------------------Constant -0.590 -1.054 -0.126 -2.521 0.013 M(B2)-M(B1) 0.186 -0.466 0.837 0.565 0.573 ------------------------------------------------------------------REGRESSION OF Y ON FACTOR B FOR: FACTOR A = 0 (LOW VALUE; DUMMY CODE =1);) MODERATOR Z = M(Z) + 1 STANDARD DEVIATION (HIGH VALUE) ------------------------------------------------------------------b 95% Confidence Interval Student-t p= Lower bound Upper bound ------------------------------------------------------------------Constant -0.782 -1.162 -0.402 -4.087 0.000 M(B2)-M(B1) 1.711 1.131 2.291 5.852 0.000 ------------------------------------------------------------------REGRESSION OF Y ON FACTOR B FOR: FACTOR A = 1 (HIGH VALUE; DUMMY CODE =0);) MODERATOR Z = M(Z) + 0 STANDARD DEVIATION (MEAN VALUE) ------------------------------------------------------------------b 95% Confidence Interval Student-t p= Lower bound Upper bound ------------------------------------------------------------------Constant -0.500 -0.809 -0.192 -3.219 0.002 M(B2)-M(B1) 0.574 0.132 1.017 2.576 0.011 ------------------------------------------------------------------REGRESSION OF Y ON FACTOR B FOR: FACTOR A = 0 (LOW VALUE; DUMMY CODE =1);) MODERATOR Z = M(Z) 0 STANDARD DEVIATION (MEAN VALUE) ------------------------------------------------------------------b 95% Confidence Interval Student-t p= Lower bound Upper bound ------------------------------------------------------------------Constant -0.349 -0.647 -0.050 -2.320 0.022 M(B2)-M(B1) 1.213 0.786 1.639 5.644 0.000 ------------------------------------------------------------------- 16 REGRESSION OF Y ON FACTOR B FOR: FACTOR A = 1 (HIGH VALUE; DUMMY CODE =0);) MODERATOR Z = M(Z) - 1 STANDARD DEVIATION (LOW VALUE) ------------------------------------------------------------------b 95% Confidence Interval Student-t p= Lower bound Upper bound ------------------------------------------------------------------Constant -0.411 -0.862 0.040 -1.807 0.074 M(B2)-M(B1) 0.963 0.359 1.567 3.164 0.002 ------------------------------------------------------------------REGRESSION OF Y ON FACTOR B FOR: FACTOR A = 0 (LOW VALUE; DUMMY CODE =1);) MODERATOR Z = M(Z) - 1 STANDARD DEVIATION (LOW VALUE) ------------------------------------------------------------------b 95% Confidence Interval Student-t p= Lower bound Upper bound ------------------------------------------------------------------Constant 0.084 -0.417 0.586 0.334 0.739 M(B2)-M(B1) 0.714 0.077 1.351 2.224 0.028 ------------------------------------------------------------------END OF ANALYSIS