linervox.blogg.se

Power calculation stata
Power calculation stata






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.

power calculation stata

  • Optional: Write a program called power_cmd_simsem_init so that you can see convergence rates for your model at different sample sizes.
  • Write a program called power_cmd_simsem that allows you to run your simulations with power.
  • Write a program to create the datasets, fit the models, and use simulate to test the program.
  • Simulate a single dataset and fit the model.
  • Obtain or derive a covariance matrix (and means, if applicable) that corresponds with your hypothesized model under the alternative hypothesis.
  • We will work through the following steps: Whichever method you choose to obtain a covariance matrix to simulate from, the remainder of our procedure will be the same as in the previous two posts. Extracting model-implied covariances after using the sem command will be demonstrated below. The RAM method will be demonstrated at the end of this post.
  • Extracting the model-implied covariance matrix after performing an sem analysis in Stata either on your own pilot study data or on another data source.
  • Using the reticular action model (RAM) to derive the model-implied covariance matrix using expected parameter estimates.
  • Using a covariance matrix published in a paper or other source.
  • power calculation stata

    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.






    Power calculation stata