It is common to fit a model where a variable (or variables) has an effect on the expected mean. You may also want to fit a model where a variable…
Read More
Search Results for: what stat should i use
How can I overlay two histograms? | Stata FAQ
This sounds like it should be pretty easy. Let’s load the hsbdemo dataset and overlay histograms for males and female for the variable write. use https://stats.idre.ucla.edu/stat/data/hsbdemo, clear twoway (histogram write…
Read More
Stata FAQHow do I specify types of missing values?
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
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
