I’ve been going through some UCLA tutorials on Sas for a couple of weeks now, and while I’m not yet an expert, there are some key differences between Stata and Sas on which I can comment.
- Reading data files
- Stata loads a data file into memory. This means calculations are faster, but that the size of data file you can use is limited to the computer’s memory.
- Sas uses “libraries” to reference files stored on the computer’s hard drive. This means if you have 1TB of hard-drive space then you can use Sas to manipulate a 1TB dataset. You would need 1,000GB of memory to do this with Stata.
- The library system in Sas also makes it possible to reference multiple data files, even in the same step. Stata, in contrast, can only work with one data file at a time.
- Syntax & Interface
- Sas’s data management syntax is more efficient that Stata’s. For example, you can copy a data file and modify (add/drop/relabel) the variables all in one step. However, Sas’s syntax is also more bulky at times, and always feels a little less intuitive than Stata’s.
- Stata’s default delimiter is a RETURN. Sas uses a semicolon, and those who aren’t used to typing semicolons on every tenth keystroke will get penalized for missing one somewhere. Sas also requires “run;” at the end of each command, whereas Stata does not.
- While Sas’s data management is more efficient, Stata’s econometrics (regressions, hypothesis tests, etc.) seem more intuitive.
- Sas’s interface feels like something from the 1990s. Stata’s interface is much better, and I especially like Stata’s side panel that shows all of the variables in the data set I have in memory. In Sas, I have to either run a command to see the variable list or double-click on the file in the “library” panel to the left.
- Graphics: I think Sas produces much better graphics than Stata.
- Help files: Stata has done an extraordinary job of putting together detailed help files for all its commands. They are also very easy to access, via internet as a .pdf or directly within Stata by typing “help _____”. Sas has help files available, but they are less detailed and more difficult to find.
One of my professors from last semester uses Sas for all his data management and processing, and then transfers the data to Stata for the econometrics. That may end up being my strategy, as well.