Upload
lenhan
View
249
Download
3
Embed Size (px)
Citation preview
STATALONGITUDINAL-DATA/PANEL-DATA
REFERENCE MANUALRELEASE 13
A Stata Press PublicationStataCorp LPCollege Station, Texas
Copyright c 19852013 StataCorp LPAll rights reservedVersion 13
Published by Stata Press, 4905 Lakeway Drive, College Station, Texas 77845Typeset in TEX
ISBN-10: 1-59718-118-8ISBN-13: 978-1-59718-118-1
This manual is protected by copyright. All rights are reserved. No part of this manual may be reproduced, storedin a retrieval system, or transcribed, in any form or by any meanselectronic, mechanical, photocopy, recording, orotherwisewithout the prior written permission of StataCorp LP unless permitted subject to the terms and conditionsof a license granted to you by StataCorp LP to use the software and documentation. No license, express or implied,by estoppel or otherwise, to any intellectual property rights is granted by this document.
StataCorp provides this manual as is without warranty of any kind, either expressed or implied, including, butnot limited to, the implied warranties of merchantability and fitness for a particular purpose. StataCorp may makeimprovements and/or changes in the product(s) and the program(s) described in this manual at any time and withoutnotice.
The software described in this manual is furnished under a license agreement or nondisclosure agreement. The softwaremay be copied only in accordance with the terms of the agreement. It is against the law to copy the software ontoDVD, CD, disk, diskette, tape, or any other medium for any purpose other than backup or archival purposes.
The automobile dataset appearing on the accompanying media is Copyright c 1979 by Consumers Union of U.S.,Inc., Yonkers, NY 10703-1057 and is reproduced by permission from CONSUMER REPORTS, April 1979.
Stata, , Stata Press, Mata, , and NetCourse are registered trademarks of StataCorp LP.
Stata and Stata Press are registered trademarks with the World Intellectual Property Organization of the United Nations.
NetCourseNow is a trademark of StataCorp LP.
Other brand and product names are registered trademarks or trademarks of their respective companies.
For copyright information about the software, type help copyright within Stata.
The suggested citation for this software is
StataCorp. 2013. Stata: Release 13 . Statistical Software. College Station, TX: StataCorp LP.
Contents
intro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Introduction to longitudinal-data/panel-data manual 1xt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Introduction to xt commands 2
quadchk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Check sensitivity of quadrature approximation 10
vce options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Variance estimators 20
xtabond . . . . . . . . . . . . . . . . . . . . . . . . . ArellanoBond linear dynamic panel-data estimation 24
xtabond postestimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Postestimation tools for xtabond 42
xtcloglog . . . . . . . . . . . . . . . . . . . . Random-effects and population-averaged cloglog models 45
xtcloglog postestimation . . . . . . . . . . . . . . . . . . . . . . . . . . . Postestimation tools for xtcloglog 60
xtdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Faster specification searches with xt data 63
xtdescribe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Describe pattern of xt data 70
xtdpd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Linear dynamic panel-data estimation 74
xtdpd postestimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Postestimation tools for xtdpd 93
xtdpdsys . . . . . . . . . . . ArellanoBover/BlundellBond linear dynamic panel-data estimation 98
xtdpdsys postestimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . Postestimation tools for xtdpdsys 108
xtfrontier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Stochastic frontier models for panel data 112
xtfrontier postestimation . . . . . . . . . . . . . . . . . . . . . . . . . . . Postestimation tools for xtfrontier 124
xtgee . . . . . . . . . . . . . . . . . . . . . . . . Fit population-averaged panel-data models by using GEE 127
xtgee postestimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Postestimation tools for xtgee 146
xtgls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Fit panel-data models by using GLS 155
xtgls postestimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Postestimation tools for xtgls 165
xthtaylor . . . . . . . . . . . . . . . . . . . . . HausmanTaylor estimator for error-components models 167
xthtaylor postestimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . Postestimation tools for xthtaylor 180
xtintreg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Random-effects interval-data regression models 184
xtintreg postestimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Postestimation tools for xtintreg 193
xtivreg . . . . . . . . . Instrumental variables and two-stage least squares for panel-data models 197
xtivreg postestimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Postestimation tools for xtivreg 219
xtline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Panel-data line plots 221
xtlogit . . . . . . . . . . . . . . Fixed-effects, random-effects, and population-averaged logit models 225
xtlogit postestimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Postestimation tools for xtlogit 243
xtnbreg . . . . Fixed-effects, random-effects, & population-averaged negative binomial models 247
i
ii Contents
xtnbreg postestimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Postestimation tools for xtnbreg 260
xtologit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Random-effects ordered logistic models 263
xtologit postestimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Postestimation tools for xtologit 272
xtoprobit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Random-effects ordered probit models 275
xtoprobit postestimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . Postestimation tools for xtoprobit 284
xtpcse . . . . . . . . . . . . . . . . . . . . . . . . . . Linear regression with panel-corrected standard errors 287
xtpcse postestimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Postestimation tools for xtpcse 298
xtpoisson . . . . . . . . . Fixed-effects, random-effects, and population-averaged Poisson models 300
xtpoisson postestimation . . . . . . . . . . . . . . . . . . . . . . . . . . . Postestimation tools for xtpoisson 323
xtprobit . . . . . . . . . . . . . . . . . . . . . . . . Random-effects and population-averaged probit models 327
xtprobit postestimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Postestimation tools for xtprobit 347
xtrc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Random-coefficients model 350
xtrc postestimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Postestimation tools for xtrc 357
xtreg . . . . . . . . Fixed-, between-, and random-effects and population-averaged linear models 359
xtreg postestimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Postestimation tools for xtreg 388
xtregar . . . . . . . . . . . . . Fixed- and random-effects linear models with an AR(1) disturbance 395
xtregar postestimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Postestimation tools for xtregar 410
xtset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Declare data to be panel data 412
xtsum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summarize xt data 425
xttab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tabulate xt data 427
xttobit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Random-effects tobit models 430
xttobit postestimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Postestimation tools for xttobit 438
xtunitroot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Panel-data unit-root tests 440
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
Subject and author index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
Cross-referencing the documentation
When reading this manual, you will find references to other Stata manuals. For example,
[U] 26 Overview of Stata estimation commands[R] regress[D] reshape
The first example is a reference to chapter 26, Overview of Stata estimation commands, in the UsersGuide; the second is a reference to the regress entry in the Base Reference Manual; and the thirdis a reference to the reshape entry in the Data Management Reference Manual.