Kenneth L. Simons, 29–Aug–16
3
J0. Copying and Pasting from Stata to a Word Processor or Spreadsheet Program ……………………….. 19!
J1. Tables of Regression Results Using Stata’s Built-In Commands …………………………………………… 19!
J2. Tables of Regression Results Using Add-On Commands ……………………………………………………… 20!
J2a. Installing or Accessing the Add-On Commands …………………………………………………………….. 20!
J2b. Storing Results and Making Tables ………………………………………………………………………………. 21!
J2c. Near-Publication-Quality Tables ………………………………………………………………………………….. 21!
J2d. Understanding the Table Command’s Options ………………………………………………………………. 22!
J2e. Saving Tables as Files ………………………………………………………………………………………………… 22!
J2f. Wide Tables ………………………………………………………………………………………………………………. 23!
J2g. Storing Additional Results ………………………………………………………………………………………….. 23!
J2h. Clearing Stored Results ………………………………………………………………………………………………. 23!
J2i. More Options and Related Commands ………………………………………………………………………….. 23!
J3. Tabulations and General Tables Using Add-On Commands …………………………………………………. 23!
K. Data Types, When 3.3 ≠ 3.3, and Missing Values ……………………………………………………………………. 24!
L. Results Returned after Commands …………………………………………………………………………………………. 24!
M. Do-Files and Programs ………………………………………………………………………………………………………… 24!
N. Monte-Carlo Simulations ……………………………………………………………………………………………………… 26!
O. Doing Things Once for Each Group ………………………………………………………………………………………. 26!
P. Generating Variables for Time-Series and Panel Data ………………………………………………………………. 27!
P1. Creating a Time Variable …………………………………………………………………………………………………. 27!
P1a. Time Variable that Starts from a First Time and Increases by 1 at Each Observation …………. 27!
P1b. Time Variable from a Date String ……………………………………………………………………………….. 28!
P1c. Time Variable from Multiple (e.g., Year and Month) Variables ………………………………………. 28!
P1d. Time Variable Representation in Stata …………………………………………………………………………. 29!
P2. Telling Stata You Have Time Series or Panel Data …………………………………………………………….. 29!
P3. Lags, Forward Leads, and Differences ………………………………………………………………………………. 29!
P4. Generating Means and Other Statistics by Individual, Year, or Group …………………………………… 30!
Q. Panel Data Statistical Methods ……………………………………………………………………………………………… 30!
Q1. Fixed Effects – Using Dummy Variables ………………………………………………………………………….. 30!
Q2. Fixed Effects – De-Meaning ……………………………………………………………………………………………. 31!
Q3. Other Panel Data Estimators ……………………………………………………………………………………………. 31!
Q4. Time-Series Plots for Multiple Individuals ………………………………………………………………………… 32!
R. Probit and Logit Models ……………………………………………………………………………………………………….. 32!
R1. Interpreting Coefficients in Probit and Logit Models ………………………………………………………….. 32!
S. Other Models for Limited Dependent Variables ………………………………………………………………………. 34!
S1. Censored and Truncated Regressions with Normally Distributed Errors ……………………………….. 35!
S2. Count Data Models …………………………………………………………………………………………………………. 35!
S3. Survival Models (a.k.a. Hazard Models, Duration Models, Failure Time Models) ………………….. 35!
T. Instrumental Variables Regression …………………………………………………………………………………………. 36!
T1. GMM Instrumental Variables Regression ………………………………………………………………………….. 37!
T2. Other Instrumental Variables Models ……………………………………………………………………………….. 38!
U. Time Series Models …………………………………………………………………………………………………………….. 38!
U1. Autocorrelations …………………………………………………………………………………………………………….. 38!
U2. Autoregressions (AR) and Autoregressive Distributed Lag (ADL) Models …………………………… 38!
U3. Information Criteria for Lag Length Selection …………………………………………………………………… 39!
U4. Augmented Dickey Fuller Tests for Unit Roots …………………………………………………………………. 39!