simsem and semTools

Calculate sample size for an indirect effect using simsem
(https://github.com/simsem/simsem/issues/55)
Hello,
I'm somehow new to the subject of running simulations and would very much appreciate some help in sorting out how to set up code for estimating sample size to observe an indirect effect in a setup like this:
https://user-images.githubusercontent.com/22635132/51598061-058a0000-1efd-11e9-94b7-f7722cab2cb3.png
Values represent typical effect sizes observed in previous research.

Function to add up paths (path tracing rules function)
i.e., given A model m1 = A<->B; B->C; A->C
pathEffect(m1, from="A", to= "C")
Would output the product of paths

simsem and semTools
simsem provides comprehensive simulation functionality for structural equation modeling. simsem allows data generation based on a user specified model, analyses of generated data, and storage and processing of simulation results. Data generation and analysis models using can be specified using lavaan syntax, or OpenMx model specifications, or a set of matrices.
For further details on simsem see: http://simsem.org
- Read more about simsem and semTools
- 4 comments
- Log in or register to post comments