This Stata FAQ shows how to check if a dataset has duplicate observations. There are two methods available for this task. The first example will use commands available in base…
Read More
Search Results for: stata
How can I convert string variables to numeric variables in Stata? | Stata FAQ
Stata FAQ: How can I convert string variables to numeric variables in Stata? The easiest way to convert string variables to numeric form is to use the encode command. If…
Read More
How can I turn a string variable containing dates into a date variable Stata can recognize? | Stata FAQ
Converting dates entered as strings into numeric dates that can be used by Stata is relatively simple. The commands vary somewhat based on the format in which the data were…
Read More
What is seemingly unrelated regression and how can I perform it in Stata? | Stata FAQ
A single model may contain a number of linear equations. In such a model it is often unrealistic to expect that the equation errors would be uncorrelated. A set of…
Read More
How do I use the Stata survey (svy) commands? | Stata FAQ
Here is a tiny example showing how to use the survey commands in Stata. Consider the data file we call svysmall shown below. use https://stats.idre.ucla.edu/stat/stata/faq/svysmall, clear list house eth wt y…
Read More
How do I use the Stata survey (svy) commands? | Stata FAQ
The examples below use Stata 7 or 8. If you are using Stata version 9, please see this page. Here is a tiny example showing how to use the survey…
Read More
How can I estimate the mean if I know the population size? | Stata FAQ
When using survey data, the mean of a variable is calculated as the total (sum of the values) for that variable divided by the population size (the total number of…
Read More
How do I analyze survey data with a one-stage cluster design? | Stata FAQ
NOTE: If you want to see the design effect or the misspecification effect, use estat effects after the command. This example is taken from Levy and Lemeshow’s Sampling of Populations….
Read More
How do I analyze survey data with a one-stage cluster design? | Stata FAQ
The examples below use Stata 8. If you are using Stata version 9, please see this page. This example is taken from Levy and Lemeshow’s Sampling of Populations. page 247…
Read More
How do I analyze survey data with poststratification? | Stata FAQ
NOTE: If you want to see the design effect or the misspecification effect, use estat effects after the command. This example is taken from Levy and Lemeshow’s Sampling of Populations,…
Read More
