Below we show how to perform post estimation hypothesis tests on models based on multiply imputed data with mi estimate, mi test and mi testtransform. The example for this faq uses data…
Read More
Search Results for: stata
How can I recode missing values into different categories? | Stata FAQ
Stata allows us to code different types of numeric missing values. It has 27 numeric missing categories. “.a” to “.z” and “.“. In this page we will show how to…
Read More
How is the 95% CI of the variance component in a mixed model calculated? | Stata FAQ
Below is a mixed model, where female is used to predict mathach, the model includes a random intercept, where the level 2 units are defined by the variable id. use…
Read More
How can I convert a multilevel model to a mixed model? | Stata FAQ
Many multilevel models can be estimated using mixed model procedures however the syntax will be rather different. The ml2mixed command (search ml2mixed; (see How can I use the search command to…
Read More
How can I perform mediation with multilevel data? (Method 1) | Stata FAQ
NOTE: We are not fully confident that the methods on this page are valid for testing for mediated effects in multilevel models. Proceed at your own risk. Mediator variables are variables that…
Read More
How can I perform mediation with multilevel data? (Method 2) | Stata FAQ
Attention See this FAQ by Bauer that discusses the need to decompose within- and between-group effects when using this approach to ensure valid results (https://dbauer.web.unc.edu/wp-content/uploads/sites/7494/2015/08/Centering-in-111-Mediation.pdf). FAQ starts here Mediator variables…
Read More
How can I do multilevel principal components analysis? | Stata FAQ
Stata does not have a command for estimating multilevel principal components analysis (PCA). This page will demonstrate one way of accomplishing this. The strategy we will take is to partition the…
Read More
Monte Carlo Power Simulation of a Multilevel Model | Stata FAQ
NOTE: Code for this page was tested in Stata 12. Several researchers wish to conduct a longitudinal multilevel study that tests a control condition versus a treatment condition. In order…
Read More
How can I do moderated mediation in Stata? | Stata FAQ
Preacher, Rucker and Hayes (2007) and updated in Hayes (2013) show how to do moderated mediation using an SPSS macro, so how can I do moderated mediation in Stata? Here…
Read More
How can I do moderated mediation with a categorical moderator in Stata? | Stata FAQ
This page is just an extension of How can I do moderated mediation in Stata? to include a categorical moderator variable. We will call that page modmed. If you are…
Read More
