Stata FAQ How do I specify types of missing values? When a data file has missing values, sometimes we may want to be able to distinguish between different types of…
Read More
Search Results for: what stat should i use
How can I list observations in blocks? | Stata FAQ
Sometimes the output of the list command can be clumsy, showing an entire observation with all of the variables wrapped across the screen. Sometimes you would like the data shown…
Read More
How can I do anova contrasts using the margins command? Stata FAQ
The margins command introduced in Stata 11 provides an easy way to compute contrasts in analysis of variance designs. We will begin by loading the hsbanova dataset and running a…
Read More
How can I use the margins command to understand multiple interactions in regression and anova? | Stata FAQ
The margins command can be a very useful tool in understanding and interpreting interactions. We will illustrate the command in two examples using the hsbdemo dataset. use https://stats.idre.ucla.edu/stat/data/hsbdemo, clear Example…
Read More
How can I get ANOVA type results from mixed using the margins command? | Stata FAQ
The anova and mixed commands present their results rather differently. The anova command displays a single test for each factor in the model including factors that have more than one…
Read More
How can I perform bootstrap estimation with multiply imputed data? | Stata FAQ
Little and Rubin (2002 p. 87) recommend a three step procedure for using multiple imputation with bootstrap standard errors: Generate bootstrap samples from the unimputed data; Impute missing values in…
Read More
How can I perform multiple imputation on longitudinal data using ICE? | Stata FAQ
How can I perform multiple imputation on longitudinal data using ICE? Imputing longitudinal or panel data poses special problems. If the data are in long form, each case has multiple…
Read More
How can I estimate R-squared for a model estimated with multiply imputed data? | Stata FAQ
R2 and adjusted R2 are often used to assess the fit of OLS regression models. Below we show how to estimate the R2 and adjusted R2 using the user-written command…
Read More
How is the 95% CI of the variance component in a mixed model calculated? | Stata FAQ
NOTE: Code for this page was tested in Stata 12. Below is a mixed model, where female is used to predict mathach, the model includes a random intercept, where 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