This is an SPSS
R
extension bundle for the robust bootstrap test ROBMED (Alfons, Ates & Groenen, 2022a) for mediation analysis. It links to the R
package robmed
.
To cite the robust bootstrap test ROBMED, please use:
Alfons, A., Ates, N.Y., & Groenen, P.J.F. (2022a). A Robust Bootstrap Test for Mediation Analysis. Organizational Research Methods, 25(3), 591--617. doi: 10.1177/1094428121999096.
To cite the extension bundle ROBMED
in publications, please use:
Alfons A (2022). ROBMED
: SPSS
R
Extension Bundle for Robust Mediation Analysis. doi: 10.25397/eur.19354268.v1.
Alfons, A., Ates, N.Y., & Groenen, P.J.F. (2022b). Robust Mediation Analysis: The R
Package robmed
. Journal of Statistical Software, 103(13), 1--45. doi: 10.18637/jss.v103.i13.
The robust bootstrap test ROBMED for mediation analysis is less sensitive to deviations from model assumptions (such as outliers or heavily tailed distributions) than the standard bootstrap test of Preacher & Hayes (2004, 2008). ROBMED utilizes the robust MM-regression estimator (Yohai, 1987) instead of the OLS estimator for regression, and runs bootstrap tests with the fast and robust bootstrap methodology (Salibián-Barrera & Zamar, 2002; Salibián-Barrera & Van Aelst, 2008).
More information can be found in our article:
Alfons, A., Ates, N.Y., & Groenen, P.J.F. (2022a). A Robust Bootstrap Test for Mediation Analysis. Organizational Research Methods, 25(3), 591--617. doi: 10.1177/1094428121999096.
Before you can install the extension bundle ROBMED
, you need to install R
and the R
plug-in for SPSS
. Make sure that you install the version of R
that is required for your version of SPSS
. Starting with SPSS
version 28.0, R
and the integration plug-in are automatically installed with SPSS
.
In R
, install the add-on package robmed
. Always make sure that the latest version of the package is installed.
Afterwards download the file ROBMED.spe
and store it on your local computer. You can then install the extension bundle:
-
From the
SPSS
menu, select Extensions > Install Local Extension Bundle... -
In the Open an Extension Bundle dialog, select the file
ROBMED.spe
and click Open.
To run the robust boostrap test ROBMED for mediation analysis:
-
From the SPSS menu, select Analyze > Regression > ROBMED: Robust Mediation Analysis
-
In the
ROBMED
dialog, select a numeric Y variable (the dependent variable), one or more X variable(s) (the independent variables of interest), and one or more numeric Mediator(s) (M) (the hypothesized mediator variables). -
Optionally, you can select one or more Covariate(s) (additional control variables).
-
In case of multiple hypothesized mediators, select between the parallel and serial multiple mediator model via Multiple mediator model. The default is to use parallel mediators.
-
Click Run.
It is important to note that SPSS
and R
store and handle categorical variables differently.
For numeric variables on an ordinal measurement scale, ROBMED
passes on the values to R
. In other words, the ordinal scale is assumed to be linear, which is typical SPSS
behavior in linear regression models.
For all other categorical variables (numeric variables on a nominal measurement scale, string variables on an ordinal or nominal measurement scale), ROBMED
preserves the categorical nature and passes on the value labels to R
. Those variables are then converted into groups of dummy variables for the analysis, which is typical R
behavior. Make sure that all value labels actually occur in the data, otherwise the analysis may give an error.
Other elements of the ROBMED
dialog can be used to further customize your analysis.
-
Confidence level: Enter an integer between 90 and 99 for the desired confidence level of the bootstrap confidence interval of the indirect effect. The default is 95 for a 95% confidence level.
-
Number of bootstrap samples: Enter an integer between 1000 and 50000 for the desired number of bootstrap samples. The default is 5000 samples. For lower values, the obtained confidence intervals may not be very accurate, as the limits are based on percentiles of the bootstrap distribution.
-
Seed of the random number generator: Optionally, enter an integer to be used as seed for the random number generator. It is important to note that setting a seed is necessary for reproducibility of results.
-
Diagnostic plot of regression weights: Check this box to create a diagnostic plot of the weights from the robust regressions. This plot allows to easily detect deviations from normality assumptions such as skewness or heavy tails.
Additional options can be entered by clicking on the Options button. This opens a subdialog that allows to customize the MM-estimator of regression and to set the random number generator for backwards compatibility with earlier versions of R
.
-
Efficiency at the normal distribution: This allows to set the desired efficiency of the MM-estimator under normally distributed error terms. Higher efficiency may increase the bias under deviations from normality, although this bias will still be bounded (unlike OLS estimation, for which the bias can become arbitrarily large under such deviations from the model assumptions). Possible values are 80%, 85% (the default), 90% or 95% efficiency.
-
Maximum number of iterations: The computation of the MM-estimator of regression requires an iterative algorithm. Enter an integer between 1000 and 1000000 for the maximum number of iterations to be executed in this algorithm. If this number of iterations is reached, the algorithm will terminate without convergence. The default is a maximum of 10000 iterations. In practice, far fewer iterations should be necessary for convergence.
-
Version of the random number generator: This allows to set the version of the random number generator to be used. In
R
version 3.6.0, the default random number generator was improved slightly, so the purpose of this option is to allow reproducibility of results obtained withR
3.5.3 or earlier. Possible values are Current (the default) for the random number generator of theR
version currently used, or Compatibility with R 3.5.3. Note that this option has no effect ifR
version 3.5.3 or earlier is used.
Figure 2: Dialog with further options for the SPSS
R
extension bundle ROBMED
, which links to the R
package robmed
.
Each version of SPSS
requires a specific version of R
for the R
plug-in. Starting with SPSS
version 28.0, R
and the integration plug-in are automatically installed with SPSS
. Nevertheless, the table below lists which version of R
is required for different versions of SPSS
.
SPSS version |
R version |
---|---|
23 | 3.1 |
24 | 3.2 |
25 | 3.3 |
26 | 3.5 |
27 | 3.6 |
28 | 4.0 |
29 | 4.2 |
If you experience any bugs or issues or if you have any suggestions for additional features, please submit an issue via the Issues tab of this repository. Please have a look at existing issues first to see if your problem or feature request has already been discussed.
If you need help using the extension bundle, or if you are interested in collaborations related to this project, please get in touch with the maintainer.