
SAS, Stata and R Code
Here are some examples of code to show the analysis displayed in the text. The files below are text files although they may have different extensions according to statistical software packages they were written. SAS code has the extension of “.sas”, Stata code has the extension of “.do” and R code has the extension of “.txt”.
Note: * indicates use of PROC IML in SAS.
|
|
SAS |
Stata |
R |
Chapter Title |
|
Chapter 1 |
Introduction |
|||
|
Chapter 2 |
Fixed Effects Models |
|||
|
Section 2.4.3 |
|
|
|
|
|
Section 2.4.4 |
|
|
|
|
|
Chapter 3 |
Models with Random Effects |
|||
|
Chapter 4 Section 4.1 |
|
|
Prediction and Bayesian Inference |
|
|
Section 4.5 |
|
|||
|
Section 4.5 |
|
|||
|
Section 4.5 |
|
|
|
|
|
Section 4.5 |
|
|
|
|
|
Chapter 5 Section 5.2 |
Multilevel Models |
|||
|
Chapter 6 Section 6.2 & 6.3 |
|
Arellano-Bond Linear, Dynamic Panel Data Estimator |
|
Stochastic Regressors |
Chapter 7 |
Modeling Issues |
|||
|
Chapter 8 Section 8.6 |
Dynamic Models |
|||
|
Section 8.6 |
|
|
|
|
|
Section 8.6 |
|
|
|
|
|
Chapter 9 |
Binary Dependent Variables |
|||
|
Chapter 10 |
Tort Filings |
Generalized Linear Models |
||
|
Chapter 11 |
|
|
Categorical Dependent Variables and Survival Models |
|
|
Supplemental Information |
|
Download Section2.5Example, shows how to calculate robust standard errors, serial correlations and variables slopes (FE models).