Learn R Programming

RMediation (version 1.1.4)

RMediation-package: Mediation Analysis Confidence Intervals

Description

We provide functions to compute confidence intervals (CIs) for a well--defined nonlinear function of the model parameters (e.g., product of k coefficients) in single--level and multilevel structural equation models.

Arguments

Author

Davood Tofighi dtofighi@unm.edu and David P. MacKinnon davidpm@asu.edu

Maintainer: Davood Tofighi <dtofighi@unm.edu>

Details

Package:RMediation
Type:Package
Version:1.1.4
Date:2016-3-12
License:GPL-2
LazyLoad:yes

medci produces a CI for the product of two normal random variables using three methods: the distribution of the product of coefficients, Monte Carlo, and asymptotic normal theory with the multivariate-delta standard error (Asymptotic-Delta) method. pprodnormal produces percentiles for the distribution of product of two normal random variables. qprodnormal generates quantiles for the distribution of product of two normal random variables. ci produces a CI for a well--defined nonlinear function of the model parameters in single--level and multilevel structural equation models using the Monte Carlo and Asymptotic-Delta method.

References

MacKinnon, D. P., Fritz, M. S., Williams, J., and Lockwood, C. M. (2007). Distribution of the product confidence limits for the indirect effect: Program PRODCLIN. Behavior Research Methods, 39, 384--389.

Meeker, W. and Escobar, L. (1994). An algorithm to compute the CDF of the product of two normal random variables. Communications in Statistics: Simulation and Computation, 23, 271--280.

Tofighi, D. and MacKinnon, D. P. (2011). RMediation: An R package for mediation analysis confidence intervals. Behavior Research Methods, 43, 692--700. doi:10.3758/s13428-011-0076-x

Tofighi, D., and MacKinnon, D. P. (2016). Monte Carlo confidence intervals for complex functions of indirect effects. Structural Equation Modeling: A Multidisciplinary Journal, 23, 194-205. http://doi.org/10.1080/10705511.2015.1057284

See Also

qprodnormal pprodnormal medci ci

Examples

Run this code

medci(mu.x=.2,mu.y=.4,se.x=.1,se.y=.05,rho=0,alpha=.05)
pprodnormal(q=.4, mu.x=.5, mu.y=.3, se.x=.03, se.y=.08, rho= 0)
qprodnormal(p=.1, mu.x=.5, mu.y=.3, se.x=.03, se.y=.8, rho=0)
ci(mu=c(b1=0,b2=0),Sigma=c(1,2,10), quant=~b1*b2)
ci(mu=c(b1=1,b2=.7,b3=.6, b4= .45), Sigma=c(.05,0,0,0,.05,0,0, .03, 0, .03),
quant=~b1*b2*b3*b4, type="all", plot=TRUE, plotCI=TRUE)

Run the code above in your browser using DataLab