|
|
xxxv | |
|
|
xxxvii | |
Preface |
|
xxxix | |
|
|
1 | (28) |
|
|
1 | (1) |
|
|
2 | (3) |
|
|
2 | (1) |
|
Additional Stata resources |
|
|
3 | (1) |
|
|
3 | (1) |
|
The search, findit, and hsearch commands |
|
|
4 | (1) |
|
Command syntax and operators |
|
|
5 | (5) |
|
|
5 | (1) |
|
Example: The summarize command |
|
|
6 | (1) |
|
Example: The regress command |
|
|
7 | (2) |
|
Abbreviations, case sensitivity, and wildcards |
|
|
9 | (1) |
|
Arithmetic, relational, and logical operators |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
10 | (5) |
|
|
10 | (1) |
|
|
11 | (1) |
|
|
12 | (1) |
|
|
13 | (1) |
|
|
13 | (1) |
|
Different implementations of Stata |
|
|
14 | (1) |
|
|
15 | (1) |
|
|
15 | (1) |
|
|
15 | (1) |
|
Using results from Stata commands |
|
|
16 | (3) |
|
Using results from the r-class command summarize |
|
|
16 | (1) |
|
Using results from the e-class command regress |
|
|
17 | (2) |
|
|
19 | (3) |
|
|
19 | (1) |
|
|
20 | (1) |
|
|
21 | (1) |
|
|
22 | (2) |
|
|
23 | (1) |
|
|
23 | (1) |
|
|
24 | (1) |
|
|
24 | (1) |
|
|
24 | (1) |
|
|
25 | (1) |
|
|
25 | (1) |
|
|
26 | (1) |
|
|
26 | (3) |
|
Data management and graphics |
|
|
29 | (42) |
|
|
29 | (1) |
|
|
29 | (3) |
|
|
30 | (1) |
|
|
30 | (1) |
|
|
31 | (1) |
|
Formats for displaying numeric data |
|
|
31 | (1) |
|
|
32 | (6) |
|
|
32 | (1) |
|
Inputting data already in Stata format |
|
|
33 | (1) |
|
Inputting data from the keyboard |
|
|
34 | (1) |
|
|
34 | (1) |
|
Inputting text data from a spreadsheet |
|
|
35 | (1) |
|
Inputting text data in free format |
|
|
36 | (1) |
|
Inputting text data in fixed format |
|
|
36 | (1) |
|
|
37 | (1) |
|
|
37 | (1) |
|
|
38 | (15) |
|
|
38 | (3) |
|
Naming and labeling variables |
|
|
41 | (1) |
|
|
42 | (1) |
|
Using original documentation |
|
|
43 | (1) |
|
|
43 | (2) |
|
|
45 | (1) |
|
Transforming data (generate, replace, egen, recode) |
|
|
45 | (1) |
|
The generate and replace commands |
|
|
46 | (1) |
|
|
46 | (1) |
|
|
47 | (1) |
|
|
47 | (1) |
|
|
47 | (1) |
|
Set of indicator variables |
|
|
48 | (1) |
|
|
49 | (1) |
|
|
50 | (1) |
|
|
51 | (1) |
|
|
51 | (2) |
|
|
53 | (4) |
|
Ordering observations and variables |
|
|
53 | (1) |
|
Preserving and restoring a dataset |
|
|
53 | (1) |
|
Wide and long forms for a dataset |
|
|
54 | (1) |
|
|
54 | (2) |
|
|
56 | (1) |
|
Graphical display of data |
|
|
57 | (11) |
|
|
57 | (1) |
|
|
57 | (1) |
|
Saving and exporting graphs |
|
|
58 | (1) |
|
Learning how to use graph commands |
|
|
59 | (1) |
|
|
60 | (1) |
|
|
61 | (1) |
|
|
62 | (2) |
|
Twoway scatterplots and fitted lines |
|
|
64 | (1) |
|
Lowess, kernel, local linear, and nearest-neighbor regression |
|
|
65 | (2) |
|
|
67 | (1) |
|
|
68 | (1) |
|
|
68 | (3) |
|
|
71 | (42) |
|
|
71 | (1) |
|
|
71 | (8) |
|
|
71 | (1) |
|
|
72 | (1) |
|
|
73 | (1) |
|
More-detailed summary statistics |
|
|
74 | (1) |
|
|
75 | (3) |
|
|
78 | (1) |
|
|
78 | (1) |
|
Regression in levels and logs |
|
|
79 | (5) |
|
|
79 | (1) |
|
OLS regression and matrix algebra |
|
|
80 | (1) |
|
Properties of the OLS estimator |
|
|
81 | (1) |
|
Heteroskedasticity-robust standard errors |
|
|
82 | (1) |
|
Cluster-robust standard errors |
|
|
82 | (1) |
|
|
83 | (1) |
|
Basic regression analysis |
|
|
84 | (6) |
|
|
84 | (1) |
|
|
85 | (1) |
|
|
86 | (1) |
|
Tables of output from several regressions |
|
|
87 | (1) |
|
Even better tables of regression output |
|
|
88 | (2) |
|
|
90 | (10) |
|
Specification tests and model diagnostics |
|
|
90 | (1) |
|
Residual diagnostic plots |
|
|
91 | (1) |
|
|
92 | (1) |
|
|
93 | (1) |
|
Test of omitted variables |
|
|
93 | (1) |
|
Test of the Box-Cox model |
|
|
94 | (1) |
|
Test of the functional form of the conditional mean |
|
|
95 | (1) |
|
|
96 | (1) |
|
|
97 | (1) |
|
Tests have power in more than one direction |
|
|
98 | (2) |
|
|
100 | (5) |
|
|
100 | (2) |
|
|
102 | (1) |
|
Prediction in logs: The retransformation problem |
|
|
103 | (1) |
|
|
104 | (1) |
|
|
105 | (4) |
|
|
106 | (1) |
|
|
106 | (1) |
|
|
107 | (2) |
|
Weighted prediction and MEs |
|
|
109 | (1) |
|
|
109 | (2) |
|
|
111 | (1) |
|
|
111 | (2) |
|
|
113 | (34) |
|
|
113 | (1) |
|
Pseudorandom-number generators: Introduction |
|
|
114 | (7) |
|
Uniform random-number generation |
|
|
114 | (2) |
|
|
116 | (1) |
|
Draws from t, chi-squared, F, gamma, and beta |
|
|
117 | (1) |
|
Draws from binomial, Poisson, and negative binomial |
|
|
118 | (1) |
|
Independent (but not identically distributed) draws from binomial |
|
|
118 | (1) |
|
Independent (but not identically distributed) draws from Poisson |
|
|
119 | (1) |
|
Histograms and density plots |
|
|
120 | (1) |
|
Distribution of the sample mean |
|
|
121 | (4) |
|
|
122 | (1) |
|
|
123 | (1) |
|
Central limit theorem simulation |
|
|
123 | (1) |
|
|
124 | (1) |
|
Alternative central limit theorem simulation |
|
|
125 | (1) |
|
Pseudorandom-number generators: Further details |
|
|
125 | (7) |
|
Inverse-probability transformation |
|
|
126 | (1) |
|
|
127 | (1) |
|
|
127 | (1) |
|
Draws from truncated normal |
|
|
128 | (1) |
|
Draws from multivariate normal |
|
|
129 | (1) |
|
Direct draws from multivariate normal |
|
|
129 | (1) |
|
Transformation using Cholesky decomposition |
|
|
130 | (1) |
|
Draws using Markov chain Monte Carlo method |
|
|
130 | (2) |
|
|
132 | (3) |
|
|
133 | (1) |
|
|
133 | (1) |
|
Monte Carlo integration using different S |
|
|
134 | (1) |
|
Simulation for regression: Introduction |
|
|
135 | (9) |
|
Simulation example: OLS with X2 errors |
|
|
135 | (3) |
|
Interpreting simulation output |
|
|
138 | (1) |
|
Unbiasedness of estimator |
|
|
138 | (1) |
|
|
138 | (1) |
|
|
138 | (1) |
|
|
139 | (1) |
|
|
140 | (1) |
|
|
140 | (1) |
|
Different sample size and number of simulations |
|
|
140 | (1) |
|
|
140 | (1) |
|
Different error distributions |
|
|
141 | (1) |
|
|
141 | (1) |
|
Simulation with endogenous regressors |
|
|
142 | (2) |
|
|
144 | (1) |
|
|
144 | (3) |
|
|
147 | (24) |
|
|
147 | (1) |
|
|
147 | (3) |
|
GLS for heteroskedastic errors |
|
|
147 | (1) |
|
|
148 | (1) |
|
Weighted least squares and robust standard errors |
|
|
149 | (1) |
|
|
149 | (1) |
|
Modeling heteroskedastic data |
|
|
150 | (6) |
|
|
150 | (1) |
|
|
151 | (1) |
|
Detecting heteroskedasticity |
|
|
152 | (2) |
|
|
154 | (2) |
|
|
156 | (1) |
|
System of linear regressions |
|
|
156 | (7) |
|
|
156 | (1) |
|
|
157 | (1) |
|
Application to two categories of expenditures |
|
|
158 | (2) |
|
|
160 | (1) |
|
Testing cross-equation constraints |
|
|
161 | (1) |
|
Imposing cross-equation constraints |
|
|
162 | (1) |
|
Survey data: Weighting, clustering, and stratification |
|
|
163 | (6) |
|
|
164 | (3) |
|
|
167 | (1) |
|
|
167 | (2) |
|
|
169 | (1) |
|
|
169 | (2) |
|
Linear instrumental-variables regression |
|
|
171 | (34) |
|
|
171 | (1) |
|
|
171 | (6) |
|
|
171 | (2) |
|
|
173 | (1) |
|
IV estimators: IV, 2SLS, and GMM |
|
|
174 | (1) |
|
Instrument validity and relevance |
|
|
175 | (1) |
|
Robust standard-error estimates |
|
|
176 | (1) |
|
|
177 | (11) |
|
|
177 | (1) |
|
Medical expenditures with one endogenous regressor |
|
|
178 | (1) |
|
|
179 | (1) |
|
IV estimation of an exactly identified model |
|
|
180 | (1) |
|
IV estimation of an overidentified model |
|
|
181 | (1) |
|
Testing for regressor endogeneity |
|
|
182 | (3) |
|
Tests of overidentifying restrictions |
|
|
185 | (1) |
|
IV estimation with a binary endogenous regressor |
|
|
186 | (2) |
|
|
188 | (9) |
|
Finite-sample properties of IV estimators |
|
|
188 | (1) |
|
|
189 | (1) |
|
Diagnostics for weak instruments |
|
|
189 | (1) |
|
Formal tests for weak instruments |
|
|
190 | (1) |
|
The estat firststage command |
|
|
191 | (1) |
|
|
191 | (2) |
|
|
193 | (2) |
|
More than one endogenous regressor |
|
|
195 | (1) |
|
Sensitivity to choice of instruments |
|
|
195 | (2) |
|
Better inference with weak instruments |
|
|
197 | (4) |
|
Conditional tests and confidence intervals |
|
|
197 | (2) |
|
|
199 | (1) |
|
|
199 | (1) |
|
Comparison of 2SLS, LIML, JIVE, and GMM |
|
|
200 | (1) |
|
|
201 | (2) |
|
|
203 | (1) |
|
|
203 | (2) |
|
|
205 | (24) |
|
|
205 | (1) |
|
|
205 | (3) |
|
|
206 | (1) |
|
Computation of QR estimates and standard errors |
|
|
207 | (1) |
|
The qreg, bsqreg, and sqreg commands |
|
|
207 | (1) |
|
QR for medical expenditures data |
|
|
208 | (8) |
|
|
208 | (1) |
|
|
209 | (1) |
|
Interpretation of conditional quantile coefficients |
|
|
210 | (1) |
|
|
211 | (1) |
|
Comparison of estimates at different quantiles |
|
|
212 | (1) |
|
|
213 | (1) |
|
|
214 | (1) |
|
Graphical display of coefficients over quantiles |
|
|
215 | (1) |
|
QR for generated heteroskedastic data |
|
|
216 | (4) |
|
|
216 | (3) |
|
|
219 | (1) |
|
|
220 | (6) |
|
Quantile count regression |
|
|
221 | (1) |
|
|
222 | (1) |
|
Summary of doctor visits data |
|
|
222 | (2) |
|
|
224 | (2) |
|
|
226 | (1) |
|
|
226 | (3) |
|
Linear panel-data models: Basics |
|
|
229 | (52) |
|
|
229 | (1) |
|
Panel-data methods overview |
|
|
229 | (5) |
|
Some basic considerations |
|
|
230 | (1) |
|
|
231 | (1) |
|
|
231 | (1) |
|
|
231 | (1) |
|
|
232 | (1) |
|
Pooled model or population-averaged model |
|
|
232 | (1) |
|
|
232 | (1) |
|
|
233 | (1) |
|
|
233 | (1) |
|
|
233 | (1) |
|
Stata linear panel-data commands |
|
|
234 | (1) |
|
|
234 | (14) |
|
Data description and summary statistics |
|
|
234 | (2) |
|
|
236 | (1) |
|
|
237 | (1) |
|
Within and between variation |
|
|
238 | (3) |
|
Time-series plots for each individual |
|
|
241 | (1) |
|
|
242 | (1) |
|
|
243 | (1) |
|
Pooled OLS regression with cluster-robust standard errors |
|
|
244 | (1) |
|
Time-series autocorrelations for panel data |
|
|
245 | (2) |
|
Error correlation in the RE model |
|
|
247 | (1) |
|
Pooled or population-averaged estimators |
|
|
248 | (3) |
|
|
248 | (1) |
|
Pooled FGLS estimator or population-averaged estimator |
|
|
248 | (1) |
|
|
249 | (1) |
|
Application of the xtreg, pa command |
|
|
250 | (1) |
|
|
251 | (3) |
|
|
251 | (1) |
|
|
251 | (1) |
|
Application of the xtreg, fe command |
|
|
252 | (1) |
|
Least-squares dummy-variables regression |
|
|
253 | (1) |
|
|
254 | (1) |
|
|
254 | (1) |
|
Application of the xtreg, be command |
|
|
255 | (1) |
|
|
255 | (2) |
|
|
255 | (1) |
|
|
256 | (1) |
|
Application of the xtreg, re command |
|
|
256 | (1) |
|
|
257 | (6) |
|
Estimates of variance components |
|
|
257 | (1) |
|
Within and between R-squared |
|
|
258 | (1) |
|
|
258 | (1) |
|
Fixed effects versus random effects |
|
|
259 | (1) |
|
Hausman test for fixed effects |
|
|
260 | (1) |
|
|
260 | (1) |
|
|
261 | (1) |
|
|
262 | (1) |
|
First-difference estimator |
|
|
263 | (2) |
|
First-difference estimator |
|
|
263 | (1) |
|
Strict and weak exogeneity |
|
|
264 | (1) |
|
|
265 | (9) |
|
|
265 | (1) |
|
|
266 | (1) |
|
The xtpcse and xtgls commands |
|
|
267 | (1) |
|
Application of the xtgls, xtpcse, and xtscc commands |
|
|
268 | (2) |
|
|
270 | (1) |
|
|
271 | (1) |
|
Unit roots and cointegration |
|
|
272 | (2) |
|
|
274 | (4) |
|
|
274 | (1) |
|
Convert wide form to long form |
|
|
274 | (1) |
|
Convert long form to wide form |
|
|
275 | (1) |
|
An alternative wide-form data |
|
|
276 | (2) |
|
|
278 | (1) |
|
|
278 | (3) |
|
Linear panel-data models: Extensions |
|
|
281 | (32) |
|
|
281 | (1) |
|
|
281 | (3) |
|
|
281 | (1) |
|
|
282 | (1) |
|
Application of the xtivreg command |
|
|
282 | (2) |
|
|
284 | (1) |
|
|
284 | (3) |
|
|
284 | (1) |
|
|
285 | (1) |
|
Application of the xthtaylor command |
|
|
285 | (2) |
|
|
287 | (11) |
|
|
287 | (1) |
|
IV estimation in the FD model |
|
|
288 | (1) |
|
|
289 | (1) |
|
Arellano-Bond estimator: Pure time series |
|
|
290 | (2) |
|
Arellano-Bond estimator: Additional regressors |
|
|
292 | (2) |
|
|
294 | (1) |
|
|
295 | (2) |
|
|
297 | (1) |
|
|
298 | (8) |
|
|
298 | (1) |
|
|
299 | (1) |
|
|
300 | (1) |
|
Cluster-robust standard errors |
|
|
301 | (1) |
|
|
302 | (1) |
|
Random-coefficients model |
|
|
303 | (1) |
|
Two-way random-effects model |
|
|
304 | (2) |
|
|
306 | (5) |
|
|
306 | (1) |
|
Clustered data using nonpanel commands |
|
|
306 | (1) |
|
Clustered data using panel commands |
|
|
307 | (3) |
|
Hierarchical linear models |
|
|
310 | (1) |
|
|
311 | (1) |
|
|
311 | (2) |
|
Nonlinear regression methods |
|
|
313 | (38) |
|
|
313 | (1) |
|
Nonlinear example: Doctor visits |
|
|
314 | (2) |
|
|
314 | (1) |
|
Poisson model description |
|
|
315 | (1) |
|
Nonlinear regression methods |
|
|
316 | (7) |
|
|
316 | (1) |
|
|
317 | (1) |
|
|
318 | (1) |
|
|
319 | (1) |
|
|
319 | (2) |
|
|
321 | (1) |
|
|
321 | (1) |
|
|
322 | (1) |
|
Different estimates of the VCE |
|
|
323 | (6) |
|
|
323 | (1) |
|
|
324 | (1) |
|
Application of the vce() option |
|
|
324 | (2) |
|
Default estimate of the VCE |
|
|
326 | (1) |
|
Robust estimate of the VCE |
|
|
326 | (1) |
|
Cluster---robust estimate of the VCE |
|
|
327 | (1) |
|
Heteroskedasticity- and autocorrelation-consistent estimate of the VCE |
|
|
328 | (1) |
|
Bootstrap standard errors |
|
|
328 | (1) |
|
|
329 | (1) |
|
|
329 | (4) |
|
The predict and predictnl commands |
|
|
329 | (1) |
|
Application of predict and predictnl |
|
|
330 | (1) |
|
|
331 | (1) |
|
Prediction at a specified value of one of the regressors |
|
|
332 | (1) |
|
Prediction at a specified value of all the regressors |
|
|
332 | (1) |
|
Prediction of other quantities |
|
|
333 | (1) |
|
|
333 | (12) |
|
Calculus and finite-difference methods |
|
|
334 | (1) |
|
MEs estimates AME, MEM, and MER |
|
|
334 | (1) |
|
Elasticities and semielasticities |
|
|
335 | (1) |
|
Simple interpretations of coefficients in single-index models |
|
|
336 | (1) |
|
|
337 | (1) |
|
MEM: Marginal effect at mean |
|
|
337 | (1) |
|
Comparison of calculus and finite-difference methods |
|
|
338 | (1) |
|
MER: Marginal effect at representative value |
|
|
338 | (1) |
|
AME: Average marginal effect |
|
|
339 | (1) |
|
Elasticities and semielasticities |
|
|
340 | (2) |
|
|
342 | (1) |
|
|
343 | (1) |
|
|
344 | (1) |
|
Complex interactions and nonlinearities |
|
|
344 | (1) |
|
|
345 | (4) |
|
|
345 | (1) |
|
Information criteria for model comparison |
|
|
346 | (1) |
|
|
347 | (1) |
|
Model-specification tests |
|
|
348 | (1) |
|
|
349 | (1) |
|
|
349 | (2) |
|
Nonlinear optimization methods |
|
|
351 | (34) |
|
|
351 | (1) |
|
|
351 | (4) |
|
|
351 | (1) |
|
|
352 | (1) |
|
Poisson NR example using Mata |
|
|
353 | (1) |
|
Core Mata code for Poisson NR iterations |
|
|
353 | (1) |
|
Complete Stata and Mata code for Poisson NR iterations |
|
|
353 | (2) |
|
|
355 | (4) |
|
|
355 | (1) |
|
|
356 | (1) |
|
Messages during iterations |
|
|
357 | (1) |
|
|
357 | (1) |
|
|
357 | (1) |
|
|
358 | (1) |
|
The ml command: If method |
|
|
359 | (5) |
|
|
360 | (1) |
|
|
360 | (1) |
|
Poisson example: Single-index model |
|
|
361 | (1) |
|
Negative binomial example: Two-index model |
|
|
362 | (1) |
|
NLS example: Nonlikelihood model |
|
|
363 | (1) |
|
|
364 | (7) |
|
Program debugging using ml check and ml trace |
|
|
365 | (1) |
|
Getting the program to run |
|
|
366 | (1) |
|
|
366 | (1) |
|
Multicollinearity and near collinearity |
|
|
367 | (1) |
|
|
368 | (1) |
|
Checking parameter estimation |
|
|
369 | (1) |
|
Checking standard-error estimation |
|
|
370 | (1) |
|
The ml command: d0, d1, and d2 methods |
|
|
371 | (5) |
|
|
371 | (2) |
|
|
373 | (1) |
|
|
374 | (1) |
|
The d1 method with the robust estimate of the VCE |
|
|
374 | (1) |
|
|
375 | (1) |
|
The Mata optimize() function |
|
|
376 | (3) |
|
|
376 | (1) |
|
|
377 | (1) |
|
|
377 | (1) |
|
Evaluator program for Poisson MLE |
|
|
377 | (1) |
|
The optimize() function for Poisson MLE |
|
|
378 | (1) |
|
Generalized method of moments |
|
|
379 | (4) |
|
|
380 | (1) |
|
|
380 | (1) |
|
GMM using the Mata optimize() function |
|
|
381 | (2) |
|
|
383 | (1) |
|
|
383 | (2) |
|
|
385 | (30) |
|
|
385 | (1) |
|
Critical values and p-values |
|
|
385 | (4) |
|
Standard normal compared with Student's t |
|
|
386 | (1) |
|
Chi-squared compared with F |
|
|
386 | (1) |
|
|
386 | (2) |
|
Computing p-values and critical values |
|
|
388 | (1) |
|
Which distributions does Stata use? |
|
|
389 | (1) |
|
Wald tests and confidence intervals |
|
|
389 | (10) |
|
Wald test of linear hypotheses |
|
|
389 | (2) |
|
|
391 | (1) |
|
|
392 | (1) |
|
|
392 | (1) |
|
Test of overall significance |
|
|
393 | (1) |
|
Test calculated from retrieved coefficients and VCE |
|
|
393 | (1) |
|
|
394 | (1) |
|
Wald test of nonlinear hypotheses (delta method) |
|
|
395 | (1) |
|
|
395 | (1) |
|
Wald confidence intervals |
|
|
396 | (1) |
|
|
396 | (1) |
|
The nlcom command (delta method) |
|
|
397 | (1) |
|
Asymmetric confidence intervals |
|
|
398 | (1) |
|
|
399 | (3) |
|
|
399 | (2) |
|
|
401 | (1) |
|
Direct computation of LR tests |
|
|
401 | (1) |
|
Lagrange multiplier test (or score test) |
|
|
402 | (3) |
|
|
402 | (1) |
|
|
403 | (1) |
|
LM test by auxiliary regression |
|
|
403 | (2) |
|
|
405 | (6) |
|
Simulation DGP: OLS with chi-squared errors |
|
|
405 | (1) |
|
|
406 | (1) |
|
|
407 | (3) |
|
|
410 | (1) |
|
|
411 | (2) |
|
|
411 | (1) |
|
|
411 | (1) |
|
Chi-squared goodness-of-fit test |
|
|
412 | (1) |
|
Overidentifying restrictions test |
|
|
412 | (1) |
|
|
412 | (1) |
|
|
413 | (1) |
|
|
413 | (1) |
|
|
413 | (2) |
|
|
415 | (30) |
|
|
415 | (1) |
|
|
415 | (2) |
|
Bootstrap estimate of standard error |
|
|
415 | (1) |
|
|
416 | (1) |
|
|
416 | (1) |
|
Use the bootstrap with caution |
|
|
416 | (1) |
|
Bootstrap pairs using the vce(bootstrap) option |
|
|
417 | (7) |
|
Bootstrap-pairs method to estimate VCE |
|
|
417 | (1) |
|
The vce(bootstrap) option |
|
|
418 | (1) |
|
Bootstrap standard-errors example |
|
|
418 | (1) |
|
|
419 | (1) |
|
|
420 | (1) |
|
Bootstrap confidence intervals |
|
|
421 | (1) |
|
The postestimation estat bootstrap command |
|
|
422 | (1) |
|
Bootstrap confidence-intervals example |
|
|
423 | (1) |
|
Bootstrap estimate of bias |
|
|
423 | (1) |
|
Bootstrap pairs using the bootstrap command |
|
|
424 | (7) |
|
|
424 | (1) |
|
Bootstrap parameter estimate from a Stata estimation command |
|
|
425 | (1) |
|
Bootstrap standard error from a Stata estimation command |
|
|
426 | (1) |
|
Bootstrap standard error from a user-written estimation command |
|
|
426 | (1) |
|
Bootstrap two-step estimator |
|
|
427 | (2) |
|
|
429 | (1) |
|
Bootstrap standard error of the coefficient of variation |
|
|
430 | (1) |
|
Bootstraps with asymptotic refinement |
|
|
431 | (3) |
|
|
431 | (1) |
|
|
432 | (1) |
|
Percentile-t Wald confidence interval |
|
|
433 | (1) |
|
Bootstrap pairs using bsample and simulate |
|
|
434 | (2) |
|
|
434 | (1) |
|
The bsample command with simulate |
|
|
434 | (2) |
|
Bootstrap Monte Carlo exercise |
|
|
436 | (1) |
|
Alternative resampling schemes |
|
|
436 | (5) |
|
|
437 | (1) |
|
|
437 | (2) |
|
|
439 | (1) |
|
|
440 | (1) |
|
|
441 | (1) |
|
|
441 | (1) |
|
|
441 | (1) |
|
The vce(jackknife) option and the jackknife command |
|
|
442 | (1) |
|
|
442 | (1) |
|
|
442 | (3) |
|
|
445 | (32) |
|
|
445 | (1) |
|
|
445 | (1) |
|
|
445 | (1) |
|
Logit, probit, linear probability, and clog-log models |
|
|
446 | (1) |
|
|
446 | (3) |
|
Latent-variable interpretation and identification |
|
|
447 | (1) |
|
|
447 | (1) |
|
The logit and probit commands |
|
|
448 | (1) |
|
Robust estimate of the VCE |
|
|
448 | (1) |
|
|
448 | (1) |
|
|
449 | (3) |
|
|
449 | (1) |
|
|
450 | (1) |
|
Comparison of binary models and parameter estimates |
|
|
451 | (1) |
|
Hypothesis and specification tests |
|
|
452 | (5) |
|
|
453 | (1) |
|
|
453 | (1) |
|
Additional model-specification tests |
|
|
454 | (1) |
|
Lagrange multiplier test of generalized logit |
|
|
454 | (1) |
|
Heteroskedastic probit regression |
|
|
455 | (1) |
|
|
456 | (1) |
|
Goodness of fit and prediction |
|
|
457 | (5) |
|
|
457 | (1) |
|
Comparing predicted probabilities with sample frequencies |
|
|
457 | (2) |
|
Comparing predicted outcomes with actual outcomes |
|
|
459 | (1) |
|
The predict command for fitted probabilities |
|
|
460 | (1) |
|
The prvalue command for fitted probabilities |
|
|
461 | (1) |
|
|
462 | (3) |
|
Marginal effect at a representative value (MER) |
|
|
462 | (1) |
|
Marginal effect at the mean (MEM) |
|
|
463 | (1) |
|
Average marginal effect (AME) |
|
|
464 | (1) |
|
|
464 | (1) |
|
|
465 | (7) |
|
|
465 | (1) |
|
|
466 | (1) |
|
Structural-model approach |
|
|
467 | (1) |
|
|
467 | (1) |
|
Maximum likelihood estimates |
|
|
468 | (1) |
|
Two-step sequential estimates |
|
|
469 | (2) |
|
|
471 | (1) |
|
|
472 | (3) |
|
Estimation with aggregate data |
|
|
473 | (1) |
|
|
473 | (2) |
|
|
475 | (1) |
|
|
475 | (2) |
|
|
477 | (44) |
|
|
477 | (1) |
|
Multinomial models overview |
|
|
477 | (3) |
|
|
477 | (1) |
|
Maximum likelihood estimation |
|
|
478 | (1) |
|
Case-specific and alternative-specific regressors |
|
|
479 | (1) |
|
Additive random-utility model |
|
|
479 | (1) |
|
Stata multinomial model commands |
|
|
480 | (1) |
|
Multinomial example: Choice of fishing mode |
|
|
480 | (4) |
|
|
480 | (3) |
|
|
483 | (1) |
|
Alternative-specific regressors |
|
|
483 | (1) |
|
|
484 | (5) |
|
|
484 | (1) |
|
Application of the mlogit command |
|
|
485 | (1) |
|
Coefficient interpretation |
|
|
486 | (1) |
|
|
487 | (1) |
|
|
488 | (1) |
|
|
489 | (7) |
|
Creating long-form data from wide-form data |
|
|
489 | (2) |
|
|
491 | (1) |
|
|
491 | (1) |
|
Application of the asclogit command |
|
|
492 | (1) |
|
Relationship to multinomial logit model |
|
|
493 | (1) |
|
Coefficient interpretation |
|
|
493 | (1) |
|
|
494 | (1) |
|
|
494 | (2) |
|
|
496 | (7) |
|
Relaxing the independence of irrelevant alternatives assumption |
|
|
497 | (1) |
|
|
497 | (1) |
|
|
498 | (1) |
|
|
499 | (2) |
|
|
501 | (1) |
|
|
501 | (1) |
|
Comparison of logit models |
|
|
502 | (1) |
|
|
503 | (5) |
|
|
503 | (1) |
|
|
503 | (1) |
|
Maximum simulated likelihood |
|
|
504 | (1) |
|
|
505 | (1) |
|
Application of the asmprobit command |
|
|
505 | (2) |
|
Predicted probabilities and MEs |
|
|
507 | (1) |
|
|
508 | (2) |
|
|
508 | (1) |
|
|
508 | (1) |
|
Data preparation for mixlogit |
|
|
509 | (1) |
|
Application of the mixlogit command |
|
|
509 | (1) |
|
|
510 | (4) |
|
|
511 | (1) |
|
|
512 | (1) |
|
Application of the ologit command |
|
|
512 | (1) |
|
|
513 | (1) |
|
|
513 | (1) |
|
|
514 | (1) |
|
|
514 | (4) |
|
|
515 | (2) |
|
|
517 | (1) |
|
|
518 | (1) |
|
|
518 | (3) |
|
Tobit and selection models |
|
|
521 | (32) |
|
|
521 | (1) |
|
|
521 | (3) |
|
Regression with censored data |
|
|
521 | (1) |
|
|
522 | (1) |
|
|
523 | (1) |
|
|
523 | (1) |
|
|
524 | (1) |
|
|
524 | (7) |
|
|
524 | (1) |
|
|
525 | (1) |
|
|
526 | (1) |
|
|
527 | (1) |
|
Left-truncated, left-censored, and right-truncated examples |
|
|
527 | (1) |
|
Left-censored case computed directly |
|
|
528 | (1) |
|
Marginal impact on probabilities |
|
|
529 | (1) |
|
|
530 | (1) |
|
Additional commands for censored regression |
|
|
530 | (1) |
|
|
531 | (7) |
|
|
531 | (1) |
|
Setting the censoring point for data in logs |
|
|
532 | (1) |
|
|
533 | (1) |
|
|
534 | (1) |
|
|
534 | (1) |
|
Tests of normality and homoskedasticity |
|
|
535 | (1) |
|
Generalized residuals and scores |
|
|
535 | (1) |
|
|
536 | (1) |
|
|
537 | (1) |
|
|
538 | (1) |
|
|
538 | (3) |
|
|
538 | (1) |
|
|
539 | (1) |
|
Part 2 of the two-part model |
|
|
540 | (1) |
|
|
541 | (6) |
|
Model structure and assumptions |
|
|
541 | (2) |
|
ML estimation of the sample-selection model |
|
|
543 | (1) |
|
Estimation without exclusion restrictions |
|
|
543 | (2) |
|
|
545 | (1) |
|
Estimation with exclusion restrictions |
|
|
546 | (1) |
|
Prediction from models with outcome in logs |
|
|
547 | (3) |
|
|
548 | (1) |
|
Predictions from two-part model |
|
|
548 | (1) |
|
Predictions from selection model |
|
|
549 | (1) |
|
|
550 | (1) |
|
|
550 | (3) |
|
|
553 | (48) |
|
|
553 | (1) |
|
|
553 | (4) |
|
|
554 | (1) |
|
Overdispersion and negative binomial data |
|
|
555 | (1) |
|
|
556 | (1) |
|
|
557 | (1) |
|
|
557 | (28) |
|
|
557 | (1) |
|
|
558 | (1) |
|
|
559 | (1) |
|
Robust estimate of VCE for Poisson MLE |
|
|
560 | (1) |
|
|
561 | (1) |
|
Coefficient interpretation and marginal effects |
|
|
562 | (1) |
|
|
562 | (1) |
|
|
563 | (2) |
|
Fitted probabilities for Poisson and NB2 models |
|
|
565 | (1) |
|
|
565 | (2) |
|
|
567 | (1) |
|
|
567 | (1) |
|
|
567 | (1) |
|
Nonlinear least-squares estimation |
|
|
568 | (1) |
|
|
569 | (2) |
|
Variants of the hurdle model |
|
|
571 | (1) |
|
Application of the hurdle model |
|
|
571 | (4) |
|
|
575 | (1) |
|
|
575 | (1) |
|
Simulated FMM sample with comparisons |
|
|
575 | (2) |
|
|
577 | (1) |
|
|
578 | (1) |
|
Application: Poisson finite-mixture model |
|
|
578 | (1) |
|
|
579 | (1) |
|
Comparing marginal effects |
|
|
580 | (2) |
|
Application: NB finite-mixture model |
|
|
582 | (2) |
|
|
584 | (1) |
|
|
585 | (1) |
|
|
585 | (6) |
|
|
585 | (1) |
|
Models for zero-inflated data |
|
|
586 | (1) |
|
Results for the NB2 model |
|
|
587 | (1) |
|
|
588 | (1) |
|
|
589 | (1) |
|
|
590 | (1) |
|
|
590 | (1) |
|
Model comparison using countfit |
|
|
590 | (1) |
|
Models with endogenous regressors |
|
|
591 | (7) |
|
Structural-model approach |
|
|
592 | (1) |
|
|
592 | (1) |
|
|
593 | (1) |
|
|
593 | (3) |
|
|
596 | (2) |
|
|
598 | (1) |
|
|
598 | (3) |
|
|
601 | (30) |
|
|
601 | (1) |
|
Nonlinear panel-data overview |
|
|
601 | (3) |
|
Some basic nonlinear panel models |
|
|
601 | (1) |
|
|
602 | (1) |
|
|
602 | (1) |
|
Pooled models or population-averaged models |
|
|
602 | (1) |
|
|
603 | (1) |
|
|
603 | (1) |
|
Stata nonlinear panel commands |
|
|
603 | (1) |
|
Nonlinear panel-data example |
|
|
604 | (3) |
|
Data description and summary statistics |
|
|
604 | (2) |
|
|
606 | (1) |
|
Within and between variation |
|
|
606 | (1) |
|
FE or RE model for these data? |
|
|
607 | (1) |
|
|
607 | (10) |
|
Panel summary of the dependent variable |
|
|
607 | (1) |
|
|
608 | (1) |
|
|
609 | (1) |
|
|
610 | (1) |
|
|
610 | (1) |
|
|
611 | (2) |
|
|
613 | (2) |
|
Panel logit estimator comparison |
|
|
615 | (1) |
|
Prediction and marginal effects |
|
|
616 | (1) |
|
Mixed-effects logit estimator |
|
|
616 | (1) |
|
|
617 | (2) |
|
Panel summary of the dependent variable |
|
|
617 | (1) |
|
|
617 | (1) |
|
|
618 | (1) |
|
Parametric nonlinear panel models |
|
|
619 | (1) |
|
|
619 | (9) |
|
|
619 | (1) |
|
Panel summary of the dependent variable |
|
|
620 | (1) |
|
|
620 | (1) |
|
|
621 | (1) |
|
|
622 | (2) |
|
|
624 | (2) |
|
Panel Poisson estimators comparison |
|
|
626 | (1) |
|
Negative binomial estimators |
|
|
627 | (1) |
|
|
628 | (1) |
|
|
629 | (2) |
|
|
631 | (16) |
|
|
631 | (6) |
|
|
631 | (1) |
|
Stata matrix input and output |
|
|
631 | (1) |
|
|
631 | (1) |
|
Matrix input from Stata estimation results |
|
|
632 | (1) |
|
Stata matrix subscripts and combining matrices |
|
|
633 | (1) |
|
|
634 | (1) |
|
|
634 | (1) |
|
Matrix accumulation commands |
|
|
635 | (1) |
|
OLS using Stata matrix commands |
|
|
636 | (1) |
|
|
637 | (6) |
|
Simple programs (no arguments or access to results) |
|
|
637 | (1) |
|
|
638 | (1) |
|
Programs with positional arguments |
|
|
638 | (1) |
|
|
639 | (1) |
|
Programs with named positional arguments |
|
|
639 | (1) |
|
Storing and retrieving program results |
|
|
640 | (1) |
|
Programs with arguments using standard Stata syntax |
|
|
641 | (1) |
|
|
642 | (1) |
|
|
643 | (4) |
|
|
644 | (1) |
|
Error messages and return code |
|
|
644 | (1) |
|
|
645 | (2) |
|
|
647 | (14) |
|
|
647 | (2) |
|
|
647 | (1) |
|
|
648 | (1) |
|
|
648 | (1) |
|
Interactive versus batch use |
|
|
648 | (1) |
|
|
648 | (1) |
|
|
649 | (9) |
|
|
649 | (1) |
|
|
649 | (1) |
|
Identity matrices, unit vectors, and matrices of constants |
|
|
650 | (1) |
|
Matrix input from Stata data |
|
|
651 | (1) |
|
Matrix input from Stata matrix |
|
|
651 | (1) |
|
Stata interface functions |
|
|
652 | (1) |
|
|
652 | (1) |
|
Element-by-element operators |
|
|
652 | (1) |
|
|
653 | (1) |
|
Scalar and matrix functions |
|
|
653 | (1) |
|
|
654 | (1) |
|
|
655 | (1) |
|
Mata matrix subscripts and combining matrices |
|
|
655 | (2) |
|
Transferring Mata data and matrices to Stata |
|
|
657 | (1) |
|
Creating Stata matrices from Mata matrices |
|
|
657 | (1) |
|
Creating Stata data from a Mata vector |
|
|
657 | (1) |
|
|
658 | (3) |
|
|
658 | (1) |
|
|
658 | (1) |
|
Mata program with results output to Stata |
|
|
659 | (1) |
|
Stata program that calls a Mata program |
|
|
659 | (1) |
|
|
660 | (1) |
Glossary of abbreviations |
|
661 | (4) |
References |
|
665 | (8) |
Author index |
|
673 | (4) |
Subject index |
|
677 | |