Simple intercepts, simple slopes, and regions of significance in MLR 3way interactions
Kristopher J. Preacher (Vanderbilt University)
Patrick J. Curran (University of North Carolina at Chapel Hill)
Daniel J. Bauer (University of North Carolina at Chapel Hill)
Get a printable PDF version of these instructions.
If the Rweb server is not working
The code generated by this utility can be pasted directly into an R console window. R (a free, opensource statistical computing environment) may be obtained here: http://cran.rproject.org/.
This web page calculates simple intercepts and simple slopes, the region of significance, and computes specific values to facilitate the plotting of significant threeway interactions in ordinary least squares (OLS) regression. The interaction can be between any combination of dichotomous and continuous variables. We assume that the user is sufficiently knowledgeable in the testing, probing, and interpretation of interactions in multiple regression (e.g., Aiken & West, 1991; Bauer & Curran, 2004; Cohen, Cohen, West & Aiken, 2003). A more extensive treatment of interaction effects can be found here. We further assume that the user has read the descriptions provided in support of the web page for probing a twoway interaction.
For the purposes of this page, we define y to be the dependent variable, x to be the predictor variable, and w and z to be the moderators. The regression equation of interest is thus
(1) 
where is the model implied value of y, x, w, and z are the three main effects, xw, xz, and wz are the three twoway interactions, and xzw is the threeway interaction. Further, _{0} is the intercept of the equation, and _{1} through _{7} are the respective regression parameters. This equation may be rearranged to highlight that the regression of y on x (denoted the focal predictor) can be understood as a function of both z and w (denoted the moderators):
(2) 
The parenthetical terms in Equation 2 are called the simple intercept and simple slope, respectively. Equation 2 can be rewritten as:
(3) 
where:
(4) 
The values of _{0} and _{1} are compound coefficients, the calculation of which is our purpose here. In practice, if the interaction term _{7} is found to be significant at a given alphalevel, the regression of y on x is typically "probed" across values of both w and z to better understand the nature of the conditional relation. In a twoway interaction, the magnitude of the regression of y on x depends in part on z; in a threeway interaction, the magnitude of the regression of y on x depends in part on z, and the magnitude of this effect depends in part on w. In other words, the regression of y on x is jointly influenced by z and w. If other predictors are included in the model (e.g., demographic covariates, etc.), the simple intercepts will be calculated and tested conditioned on values of zero for these covariates. For interpretational purposes, it is thus essential that values of zero be within the bounds of the data. We recommend that continuous covariates be mean centered prior to analysis and that a useful reference group be chosen for categorical covariates. Note, however, that the computation and testing of simple slopes (often of most interest) do not depend on the scaling of other covariates in the model.
The table below provides three sets of output that allow for further probing of the xwz interaction.
The first available output is the region of significance of the relation between y and x as a function of z and w. The region of significance defines the specific values of w and z at which the regression of y on x moves from nonsignificance to significance. Although this region can be easily obtained when testing a twoway interaction, these are much more complex to compute for a threeway interaction (see Bauer & Curran, 2004, for further details). As is proposed in Bauer & Curran (2004) and Curran et al. (2004), the table allows for the calculation of the region of significance of the regression of y on x across values of z at a particular value of w. This is thus a melding of the simple slopes and region approach. There are lower and upper bounds to the region. In many cases, the regression of y on the focal predictor is significant at values of the moderator that are less than the lower bound and greater than the upper bound, and the regression is nonsignificant at values of the moderator falling within the region. However, there are some cases in which the opposite holds (e.g., the significant slopes fall within the region). Consequently, the output will explicitly denote how the region should be defined in terms of the significance and nonsignificance of the simple slopes. There are also instances in which the region cannot be mathematically obtained, and an error is displayed if this occurs for a given application. By default, the region is calculated at = .05, but this may be changed by the user. Finally, the point estimates and standard errors of both the simple intercepts and the simple slopes are automatically calculated precisely at the lower and upper bounds of the region. Calculation of these simple intercepts and slopes at any values of z and w is described below.
Simple Intercepts and Simple Slopes
The second available output is the calculation of point estimates and standard errors for up to two simple intercepts (_{0}) and simple slopes (_{1}) of y on x at specific values of w and z. A simple slope is defined as the regression of the outcome y on the predictor x at specific values of the moderators w and z. In the table we refer to these specific values of w and z as conditional values (cv_{w1}, cv_{w2}, and cv_{w3} and cv_{z1}, cv_{z2}, and cv_{z3}). We can choose from a variety of potential conditional values of w and z for the computation of the simple intercepts and slopes. If w or z is dichotomous, we could select conditional values of 0 and 1 to compute the regression of y on x within group 0 and group 1. If z or w is continuous, we might select conditional values that are one standard deviation above the mean of z or w, equal to the mean of z or w, and one standard deviation below the mean of z or w. Whatever the conditional values chosen, these specific values are entered in the sections labeled "Conditional Values of Z" and "Conditional Values of W," and this will provide the corresponding simple slopes of y on x at those values of z and w.
Given the calculation of one or more simple slopes, it is common to plot these relations graphically to improve interpretability of effects. The final available output is the calculation of a lower and upper value associated with each of the simple slopes to aid in the graphing of these using any standard software package (e.g., Excel, SPSS, etc.). If desired, the user enters any two values of x in order to plot the regression line between y and x at the specific values of z. Although any pair of moderator values can be used, we recommend using either the lower and upper observed values of z, the lower and upper possible values of z, or one sd below and above the mean of z. However, many other specific values can be chosen that may be more appropriate for a particular research application.
Simple intercepts and slopes, the region of significance, and points to plot can be obtained by following these five steps. Use as many significant digits as possible for optimal precision.
Once all of the necessary information is entered into the table, simply click "Calculate". The message box will identify any errors that might have been encountered. If no errors are found, the results will be presented in the output window. The results in the output window can be pasted into any word processor for printing.
R Code for Creating Simple Slopes Plot
Below the output window are two additional windows. If conditional values of x and z, as well as at least one conditional value of w, are entered, clicking on "Calculate" will also generate R code for producing a plot of the interaction between x and z at the lowest value of w (R is a statistical computing language). This R code can be submitted to a remote Rweb server by clicking on "Submit above to Rweb." A new window will open containing a plot of the interaction effect. The user may make any desired changes to the generated code before submitting, but changes are not necessary to obtain a basic plot. Indeed, this window can be used as an allpurpose interface for R.
R Code for Creating Confidence Bands / Regions of Significance Plot
Assuming enough information is entered into the interactive table, the second output window below the table will include R syntax for generating confidence bands, continuously plotted confidence intervals for simple slopes corresponding to all conditional values of the moderator z at the lowest conditional value of w. The xaxis of the resulting plot will represent conditional values of the moderator, and the yaxis represents values of the simple slope of y regressed on the focal predictor.
If the moderator z is dichotomous, only two values along the xaxis (corresponding to the codes used for grouping) would be interpretable. Therefore, in cases where x is continuous and z is dichotomous, we suggest treating z as the moderator for the simple slopes plot (so that each line will represent the regression of y on x at conditional values of z) and treating x as the moderator for the confidence bands / regions of significance plot (so that the xaxis will represent values of the focal predictor x and the yaxis will represent the group difference in y at conditional values of x). This will require switching the roles of x and z in the interactive table, requiring the entry of some new values from the ACOV matrix and reentering old values in new places.
Regardless of what variable is treated as the moderator, the user is expected to supply lower and upper values for the moderator z (10 and +10 by default). As above, this R code can be submitted to a remote Rweb server by clicking on "Submit above to Rweb." A new window will open containing a plot of confidence bands.
x: focal predictor; z and w: moderators

Aiken, L. S., & West, S. G. (1991). Multiple regression: Testing and interpreting interactions. Thousand Oaks: Sage.
Bauer, D. J., & Curran, P. J. (2005). Probing interactions in fixed and multilevel regression: Inferential and graphical techniques. Multivariate Behavioral Research, 40, 373400.
Cohen, J., Cohen, P., West, S. G., & Aiken, L. S. (2003). Applied multiple regression/correlation analysis for the behavioral sciences, 3rd ed. Hillsdale: Erlbaum.
Curran, P. J., Bauer, D. J., & Willoughby, M. T. (2004). Testing main effects and interactions in latent curve analysis. Psychological Methods, 9, 220237.
Preacher, K. J., Curran, P. J., & Bauer, D. J. (2006). Computational tools for probing interaction effects in multiple linear regression, multilevel modeling, and latent curve analysis. Journal of Educational and Behavioral Statistics, 31, 437448.
Original version posted September, 2003. Free JavaScripts provided by The JavaScript Source and John C. Pezzullo.