Stata 12 introduces many new commands. In this FAQ we will look at the contrast command and shown how it can be used to explore interactons. This page will show…
Read More
Search Results for: stata
How can I make a correlation matrix heat map? | Stata FAQ
This page will show several methods for making a correlation matrix heat map. The first thing we need is a correlation matrix which we will create using the corr2data command…
Read More
How can I analyze count data in Stata? | Stata FAQ
Stata has several procedures that can be used in analyzing count data. Let’s begin by loading and describing a dataset on 316 students at two Los Angeles high schools. use…
Read More
How can I use countfit in choosing a count model? | Stata FAQ
When modeling a count variable, there are several available models to choose from. Stata supports Poisson, negative binomial, zero-inflated Poisson, zero-inflated negative binomial models, zero-truncated Poisson, and zero-truncated negative binomial…
Read More
FAQ:How can I determine the correct term in an anova using Stata?
One method for determining correct denominators in analysis of variance is the Cornfield-Tukey method. To learn how to manually compute Cornfield-Tukey see our FAQ page. This page will demonstrate the…
Read More
How can I recode continuous variables into groups? | Stata FAQ
There may be times that you would like to convert a continuous variable into groups. For example, you might want to convert a continuous reading score that ranges from 0…
Read More
Stata FAQ: How can I count the number of days between two dates? | Stata FAQ
Stata makes it very simple to calculate the amount of time between two dates, because it internally represents each date as a number. This is convenient when you need to…
Read More
How can I read dates with both 2-digit and 4-digit year? | Stata FAQ
Let’s read in some dates in string format. clear input str10 date_str “4/16/2005” “3/29/11” “8/15/2009” “5/14/07” “5/3/08” “10/10/2010” end list, clean date_str 1. 4/16/2005 2. 3/29/11 3. 8/15/2009 4. 5/14/07…
Read More
How can I get denominator degrees of freedom for mixed? | Stata FAQ
At first glance this may seem to be a very silly question. Everyone knows that mixed reports chi-square and that chi-square does not have denominator degrees of freedom. Certainly, mixed…
Read More
How to generate a saturated model using DESMAT? | Stata FAQ
Sometimes, we need to generate a saturated model. In Stata, this can be done easily using the program desmat, written by John Hendrickx. The command needs to be downloaded before…
Read More
