Calculate Effect Sizes using lavaan Models
It calculates effect sizes with Delta Method by formulating the effect sizes as functions of SEM in lavaan.
calEffSizes(model, n, Cov, Mean, lavaan.output=FALSE, ...)
model |
A lavaan model. Effect sizes are defined as functions of
SEM parameters with |
n |
Sample sizes |
Cov |
A covariance matrix or a list of covariance matrices. |
Mean |
Optional sample means. |
lavaan.output |
If |
... |
Further arguments passed to |
Effect sizes and their sampling covariance matrix or a lavaan fitted object.
The input matrices are treated as covariance matrices unless there are explicit constraints in the model.
Mike W.-L. Cheung <mikewlcheung@nus.edu.sg>
Cheung, M. W.-L. (2015). Meta-analysis: A structural equation modeling approach. Chichester, West Sussex: John Wiley & Sons, Inc.
Cheung, M. W.-L. (2018). Computing multivariate effect sizes and their sampling covariance matrices with structural equation modeling: Theory, examples, and computer simulations. Frontiers in Psychology, 9(1387). https://doi.org/10.3389/fpsyg.2018.01387
## Not run: ## Select ATT, Bi, and BEH obs.vars <- c("BEH", "BI", "ATT") ## Select one study from Cooke16 for illustration my.cor <- Cooke16$data[[4]][obs.vars, obs.vars] my.n <- Cooke16$n[4] ## Effect sizes: indirect effect and direct effect model <- "BEH ~ c*ATT + b*BI BI ~ a*ATT ## Indirect effect Ind := a*b Dir := c" calEffSizes(model=model, n=my.n, Cov=my.cor, lavaan.output=FALSE) ## Return the lavaan fitted model fit <- calEffSizes(model=model, n=my.n, Cov=my.cor, lavaan.output=TRUE) lavaan::summary(fit) lavaan::parameterestimates(fit) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.