If you are creating multiple datasets in Stata, you may wish to name them in an automated manner. The code below demonstrates how to create a filename that is based…
Read More
Search Results for: stata
How can I make a bar graph with error bars? | Stata FAQ
Say that you were looking at writing scores broken down by race and ses. You might want to graph the mean and confidence interval for each group using a bar…
Read More
How can I do CFA with binary variables? | Stata FAQ
Let’s say that you have a dataset with a bunch of binary variables. Further, you believe that these binary variables reflect underlying and unobserved continuous variables. You don’t want to…
Read More
How can I graphically compare OLS and BLUP results in Stata? | Stata FAQ
There are two ways you could go about this: 1) graph the shrinkage of OLS to BLUP (Best Linear Unbiased Predictor) and 2) graph both the fitted OLS regression lines…
Read More
Can I do by and sort in one command? | Stata FAQ
When you want to use by var: command you need to first sort var beforw uaing the by, however, it is possible to the by and the sort into a…
Read More
How can I do correspondence analysis on summary data? | Stata FAQ
There are times when you want to do correspondence anlysis and the data have been collapsed into a summary with counts for each of the categories. For example, here is…
Read More
How can I understand a categorical by continuous interaction? (Stata 12) | Stata FAQ
First off, let’s start with what a significant categorical by continuous interaction means. It means that the slope of the continuous variable is different for one or more levels of…
Read More
How do I change the font (PC version)? | Stata FAQ
You can change the font style and font size for most windows by right-clicking in the window and then selecting “Font…”. In a Stata do-file, you can right-click and then…
Read More
How can I graph chi-square power curves in Stata? | Stata FAQ
It is fairly easy to generate power curves for the chi-square distribution using Stata. This FAQ page will show you one way you can do it. Here is a code…
Read More
How can I compute power for contingency tables in Stata? | Stata FAQ
There are many different programs that will compute power for contingency tables including online power calculators. This FAQ page will show you how to compute contingency table power using the Stata…
Read More
