Archive

Archive for August 2021

Customizable tables in Stata 17, part 5: Tables for one regression model

In my last post, I showed you how to use the new and improved table command with the command() option to create a table of statistical tests. In this post, I want to show you how to use the command() option to create a table for a single regression model. Our goal is to create the table in the Microsoft Word document below. Read more…

Customizable tables in Stata 17, part 4: Table of statistical tests

In my last post, I showed you how to use the new and improved table command with the statistic() option to create a classic table 1. In this post, I want to show you how to use the command() option to create a table of statistical tests. Our goal is to create the table in the Microsoft Word document below. Read more…

Calculating power using Monte Carlo simulations, part 5: Structural equation models

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. In today’s post, I’m going to show you how to estimate power for structural equation models (SEM) using simulations.

Our goal is to write a program that will calculate power for a given SEM at different sample sizes. 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. Rather than individually simulating each variable for our specified model, we’ll be simulating all our variables simultaneously from a given covariance matrix. 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. Read more…