multilevel.indirect {misty}R Documentation

Confidence Interval for the Indirect Effect in a 1-1-1 Multilevel Mediation Model

Description

This function computes the confidence interval for the indirect effect in a 1-1-1 multilevel mediation model with random slopes based on the Monte Carlo method.

Usage

multilevel.indirect(a, b, se.a, se.b, cov.ab = 0, cov.rand, se.cov.rand,
                    nrep = 100000, alternative = c("two.sided", "less", "greater"),
                    seed = NULL, conf.level = 0.95, digits = 3, write = NULL,
                    append = TRUE, check = TRUE, output = TRUE)

Arguments

a

a numeric value indicating the coefficient aa, i.e., average effect of XX on MM on the cluster or between-group level.

b

a numeric value indicating the coefficient bb, i.e., average effect of MM on YY adjusted for XX on the cluster or between-group level.

se.a

a positive numeric value indicating the standard error of aa.

se.b

a positive numeric value indicating the standard error of bb.

cov.ab

a positive numeric value indicating the covariance between aa and bb.

cov.rand

a positive numeric value indicating the covariance between the random slopes for aa and bb.

se.cov.rand

a positive numeric value indicating the standard error of the covariance between the random slopes for aa and bb.

nrep

an integer value indicating the number of Monte Carlo repetitions.

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less".

seed

a numeric value specifying the seed of the random number generator when using the Monte Carlo method.

conf.level

a numeric value between 0 and 1 indicating the confidence level of the interval.

digits

an integer value indicating the number of decimal places to be used for displaying

write

a character string naming a text file with file extension ".txt" (e.g., "Output.txt") for writing the output into a text file.

append

logical: if TRUE (default), output will be appended to an existing text file with extension .txt specified in write, if FALSE existing text file will be overwritten.

check

logical: if TRUE (default), argument specification is checked.

output

logical: if TRUE (default), output is shown on the console.

Details

In statistical mediation analysis (MacKinnon & Tofighi, 2013), the indirect effect refers to the effect of the independent variable XX on the outcome variable YY transmitted by the mediator variable MM. The magnitude of the indirect effect abab is quantified by the product of the the coefficient aa (i.e., effect of XX on MM) and the coefficient bb (i.e., effect of MM on YY adjusted for XX). However, mediation in the context of a 1-1-1 multilevel mediation model where variables XX, MM, and YY are measured at level 1, the coefficients aa and bb can vary across level-2 units (i.e., random slope). As a result, aa and bb may covary so that the estimate of the indirect effect is no longer simply the product of the coefficients a^b^\hat{a}\hat{b}, but a^b^+τa,b\hat{a}\hat{b} + \tau_{a,b}, where τa,b\tau_{a,b} (i.e., cov.rand) is the level-2 covariance between the random slopes aa and bb. The covariance term needs to be added to a^b^\hat{a}\hat{b} only when random slopes are estimated for both aa and bb. Otherwise, the simple product is sufficient to quantify the indirect effect, and the indirect function can be used instead.

In practice, researchers are often interested in confidence limit estimation for the indirect effect. There are several methods for computing a confidence interval for the indirect effect in a single-level mediation models (see indirect function). The Monte Carlo (MC) method (MacKinnon et al., 2004) is a promising method in single-level mediation model which was also adapted to the multilevel mediation model (Bauer, Preacher & Gil, 2006). This method requires seven pieces of information available from the results of a multilevel mediation model:

a

Coefficient aa, i.e., average effect of XX on MM on the cluster or between-group level. In Mplus, Estimate of the random slope aa under Means at the Between Level.

b

Coefficient aa, i.e., average effect of MM on YY on the cluster or between-group level. In Mplus, Estimate of the random slope bb under Means at the Between Level.

se.a

Standard error of a. In Mplus, S.E. of the random slope aa under Means at the Between Level.

se.a

Standard error of a. In Mplus, S.E. of the random slope aa under Means at the Between Level.

cov.ab

Covariance between aa and bb. In Mplus, the estimated covariance matrix for the parameter estimates (i.e., asymptotic covariance matrix) need to be requested by specifying TECH3 along with TECH1 in the OUTPUT section. In the TECHNICAL 1 OUTPUT under PARAMETER SPECIFICATION FOR BETWEEN, the numbers of the parameter for the coefficients aa and bb need to be identified under ALPHA to look up cov.av in the corresponding row and column in the TECHNICAL 3 OUTPUT under ESTIMATED COVARIANCE MATRIX FOR PARAMETER ESTIMATES.

cov.rand

Covariance between the random slopes for aa and bb. In Mplus, Estimate of the covariance aa WITH bb at the Between Level

.

se.cov.rand

Standard error of the covariance between the random slopes for aa and bb. In Mplus, S.E. of the covariance aa WITH bb at the Between Level

.

Note that all pieces of information except cov.ab can be looked up in the standard output of the multilevel mediation model. In order to specify cov.ab, the covariance matrix for the parameter estimates (i.e., asymptotic covariance matrix) is required. In practice, cov.ab will oftentimes be very small so that cov.ab may be set to 0 (i.e., default value) with negligible impact on the results.

Value

Returns an object of class misty.object, which is a list with following entries:

call

function call

type

type of analysis

data

list with the input specified in a, b, se.a, se.b, cov.ab, cov.rand, and se.cov.rand

args

specification of function arguments

result

list with result tables, i.e., ab for the simulated ab values and mc for the estimate of the indirect effect and the confidence interval

Note

The function was adapted from the interactive web tool by Preacher and Selig (2010).

Author(s)

Takuya Yanagida takuya.yanagida@univie.ac.at

References

Bauer, D. J., Preacher, K. J., & Gil, K. M. (2006). Conceptualizing and testing random indirect effects and moderated Mediation in multilevel models: New procedures and recommendations. Psychological Methods, 11, 142-163. https://doi.org/10.1037/1082-989X.11.2.142

Kenny, D. A., Korchmaros, J. D., & Bolger, N. (2003). Lower level Mediation in multilevel models. Psychological Methods, 8, 115-128. https://doi.org/10.1037/1082-989x.8.2.115

MacKinnon, D. P., Lockwood, C. M., & Williams, J. (2004). Confidence limits for the indirect effect: Distribution of the product and resampling methods. Multivariate Behavioral Research, 39, 99-128. https://doi.org/10.1207/s15327906mbr3901_4

MacKinnon, D. P., & Tofighi, D. (2013). Statistical mediation analysis. In J. A. Schinka, W. F. Velicer, & I. B. Weiner (Eds.), Handbook of psychology: Research methods in psychology (pp. 717-735). John Wiley & Sons, Inc..

Preacher, K. J., & Selig, J. P. (2010). Monte Carlo method for assessing multilevel Mediation: An interactive tool for creating confidence intervals for indirect effects in 1-1-1 multilevel models [Computer software]. Available from http://quantpsy.org/.

See Also

indirect

Examples

## Not run: 
# Example 1: Confidence Interval for the Indirect Effect
multilevel.indirect(a = 0.25, b = 0.20, se.a = 0.11, se.b = 0.13,
                    cov.ab = 0.01, cov.rand = 0.40, se.cov.rand = 0.02)

# Example 2: Save results of the Monte Carlo method
ab <- multilevel.indirect(a = 0.25, b = 0.20, se.a = 0.11, se.b = 0.13,
                          cov.ab = 0.01, cov.rand = 0.40, se.cov.rand = 0.02,
                          output = FALSE)$result$ab

# Histogram of the distribution of the indirect effect
hist(ab)

# Example 3: Write results into a text file
multilevel.indirect(a = 0.25, b = 0.20, se.a = 0.11, se.b = 0.13,
                    cov.ab = 0.01, cov.rand = 0.40, se.cov.rand = 0.02,
                    write = "ML-Indirect.txt")

## End(Not run)

[Package misty version 0.6.5 Index]