egen mean I work a lot with clustered data, including group psychotherapy data (people clustered in groups), individual psychotherapy data (people clustered within therapists), and longitudinal data (observations clustered within people). Consequently, I often need to create cluster-level means and grand means for graphing and modeling. The egen mean function makes creating means easy. CombiningContinue reading “Things I Love About Stata — egen mean”
The primary method for creating new variables in Stata is the generate command. Load the auto dataset. New Variable from Existing Variables Let’s create a new variable that is the sum of weight and length (ignore for the moment that summing weights and lengths doesn’t make a ton of sense). The syntax of generate is:Continue reading “Stata: Using generate to create new variables”
This page provides Mplus input and output files, as well as data files, for the examples I use in the Structural Equation Modeling (SEM) workshop. I also provide a link for the lecture slides. The Mplus files and data are stored on GitHub. For any who are interested, feel free to clone the directory andContinue reading “Beginning and Advanced SEM”
Predicted Scores in Stata As we discussed in class, the predicted value of the outcome variable can be created using the regression model. For example, we can use the auto dataset from Stata to look at the relationship between miles per gallon and weight across various cars. We estimate the follow equation Thus, we seeContinue reading “Stata: Predicted Scores and Residuals”
Something went wrong. Please refresh the page and/or try again.
Follow My Blog
Get new content delivered directly to your inbox.