Stata Quick Reference
For Statistics, Data Analysis, and Reproducible Research
by Maruthy Pannala, PhD · 70 pages
PDF downloads for this title aren’t available yet — you can read it in full above.
About This Book
Stata Quick Reference is a working desk reference, not a course. It assumes you already know what a mean and a standard deviation are, and gets straight to the Stata syntax you need to load a dataset, shape it, run the command that answers your question, and reproduce the result six months later.
Ten chapters build from Stata's command grammar and do-file workflow through variable types, labels, and the Data Editor, generating and recoding data with generate/egen, importing and exporting real files, merging and reshaping datasets, descriptive statistics (summarize, tabulate, correlate), hypothesis testing (ttest, anova, nonparametric alternatives), regression and modeling (regress, logit, margins), statistical graphics with twoway and graph, and the macro/program constructs that keep a Stata do-file reusable and reproducible. A one-page syntax appendix closes the book for the fastest possible lookup.
Unlike this series' Python, R, and SQL titles, no Stata interpreter is available in the environment this book was written in, since Stata is commercial, license-locked software with no free interpreter suitable for unattended sandbox execution -- the same situation as this series' SAS Quick Reference. Every numeric result quoted in the book was independently computed in Python or R and cross-checked, and every Stata command was checked line by line against StataCorp's official documentation for correct syntax. Nothing here was silently fabricated -- where a result rests on cross-verification rather than a live Stata session, the book says so. If your own Stata output differs, something in your data or options differs too, and that is worth tracking down before moving on.
Table of Contents
- 1Stata Essentials: Interactive Session, Do-Files & Syntax
- 2Data Types, Variables, Labels & the Data Editor
- 3Data Manipulation: generate, egen & Control Flow
- 4Reading, Writing & Importing Data
- 5Combining and Reshaping Datasets
- 6Descriptive Statistics: summarize, tabulate & correlate
- 7Statistical Inference: ttest, anova & correlate Significance
- 8Regression & Modeling: regress, logit & margins
- 9Statistical Graphics with twoway and graph
- 10Do-Files, Programs & Reproducibility
- Appendix A: One-Page Syntax Quick Reference