## A correlation matrix as input
x <- matrix(c(1, 0.4, 0.2, 0.4, 1, 0.3, 0.2, 0.3, 1), ncol=3)
dimnames(x) <- list( c("y", "m", "x"), c("y", "m", "x") )
indirectEffect(x, n=300)
## A list of correlation matrices
indirectEffect( list(x, x), n=c(300,500), standardized=FALSE )
Run the code above in your browser using DataLab