I'm pretty new to the whole statistics world, so excuse me for being a novice in advance. I'm trying to understand Andrew F. Hayes's PROCESS macro in SPSS [1]. To my best understanding, the macro uses the Johnson-Neyman [JN] method [2] to partition a quantitative moderator/mediator value into some regions of significance. And then uses the ANOVA method to analyze the bivariate correlation of the two other variables grouped based on the calculated intervals of the moderator value. Something like a non-heuristic classification method.
Here Carden et al, [3] have implemented the JN method in an Excell template called CAHOST (Download). Other implementations of the algorithm should be available in PyProcessMacro, processr, and ProcessR. Now as I have explained here, my goal is to understand the math behind JN and maybe implement a macro for Open/LibreOffice Calc. I would appreciate it if you could walk me through the math behind the JN method, for example as explained here. Consider the first equation:
$$Y_i = \gamma_0 + \gamma_1 X_i + \gamma_2 M_i + \gamma_3 X_i M_i + \epsilon_i \tag{1}$$
to be the assumed trivariate linear casualty-moderation/mediation between $X$ as the focal predictor, $Y$ is the response variable and $M$ is the moderator/mediator. The $\gamma_j$ coefficients should be constant scalars and $\epsilon_i$ is the regression error for the $i^{th}$ sample. They have written the equation in matrix form for the whole sample group as
$$\hat{Y} = \hat{\gamma}_0 + \hat{\gamma}_1 X + \hat{\gamma}_2 M + \hat{\gamma}_3 X M \tag{2}$$
which I do not understand. For example, what are the dimensions of the matrices in the above equation? Shouldn't the $\hat{\gamma}_j$s be constant scalars? and where did the error go?
References:
- Hayes, A. F. (2013b). Introduction to Mediation, Moderation, and Conditional Process Analysis: A Regression-Based Approach. New York, NY: The Guilford Press.
- Johnson, P. O., and Neyman, J. (1936). Tests of certain linear hypotheses and their applications to some educational problems. Stat. Res. Mem. 1, 57–39.
- Carden, S. W., Holtzman, N. S., & Strube, M. J. (2017). CAHOST: An Excel workbook for facilitating the Johnson-Neyman technique for two-way interactions in multiple regression. Frontiers in Psychology, 8, 1293.