
Step 1: Obtain or derive a covariance matrix (and means, if applicable) that corresponds with your hypothesized model Specifically, we would like to fit the following model:įigure 1: Path diagram of the hypothesized model We will define health as a latent variable measured by systolic blood pressure ( bpsystol), diastolic blood pressure ( bpdiast), serum cholesterol ( tcresult), and serum triglyercides ( tgresult). We can use the NHANES dataset to obtain a reasonable covariance matrix from which we can simulate new data. We are planning a new study to evaluate the interaction effect between age and sex on health.


There are three ways you can obtain a covariance matrix to simulate SEM data: Means for each of the variables can also be used to simulate the data if your SEM has a mean structure, such as in group analysis or growth curve analysis. Rather than individually simulating each variable for our specified model, we’ll be simulating all our variables simultaneously from a given covariance matrix. We’ll follow the same general procedure as the previous two posts, but the way we’ll go about simulating data is a bit different. Our goal is to write a program that will calculate power for a given SEM at different sample sizes.
#Power calculation stata how to
In today’s post, I’m going to show you how to estimate power for structural equation models (SEM) using simulations. In our last four posts in this series, we showed you how to calculate power for a t test using Monte Carlo simulations, how to integrate your simulations into Stata’s power command, and how to do this for linear and logistic regression models and multilevel models.
