During the course “Introduction to Data Science”, we will build our very own Stata Cookbook. This repository will hold a collection of useful Stata commands with notes on when and how to use them.
We encourage you to use the joint Stata Cookbook for this course to build your own personal cookbook. Our shared collection of commands will cover most of the commands you will be using throughout the course, but there are good reasons to build on that foundation: perhaps you want to augment our notes on how to use commands, so that they are more clear or fit your preferred use better. Perhaps you found a useful commands or tricks online and you want to include them in your personal cookbook. Most importantly, once “Introduction to Data Science” ends, you will continue to use Stata in other courses. Having your own personal cookbook allows you to keep adding new commands and notes.
This repository always holds the most up-to-date version of our cookbook. There are two identical versions of the cookbook.
You can get the entire cookbook in one file (download), or you can get parts of the cookbook grouped by topic:
- intro.do (download)
- logging.do (download)
- importing.do (download)
- labeling.do (download)
- graphing.do (download)
- ideal.do (download)
Additional components on manipuating variables, describing, estimating and testing are forthcoming and will be added both as individual do-files and to the all-in-one version.
Are you used to working with GitHub? You can also clone the entire repository to get your own versioned copy of the cookbook.
Our cookbook is meant to be a collaborative effort. If you found a useful command or trick elsewhere, or if you have useful additions to the notes, you can contribute them to the shared cookbook for the benefit of everyone — and earn a bonus for your grade while you are at it!
There are two ways to contribute:
- If you are a GitHub user, use the regular GitHub workflow for contributing to projects: fork the repository, use a branch to add your contribution, then send us your changes with a pull request. Your change will be reviewed and bonus awarded in GitHub.
- If you are not a GitHub user, you can simply mail in your contribution using your simple online form. You will get an email response to confirm your submission and an email with your bonus once the your contribution has been reviewed.