
Maximum Likelihood Estimation with Stata, Fifth Edition |
||||||||||||||||||||||||||||||||||||||
![]() Click to enlarge See the back cover |
$68.00 Print Add to cart$54.00 VitalSource eBook Add to cart$54.00 Amazon Kindle Buy from Amazon![]()
As an Amazon Associate, StataCorp earns a small referral credit from
qualifying purchases made from affiliate links on our site.
|
|
||||||||||||||||||||||||||||||||||||
Comment from the Stata technical groupMaximum Likelihood Estimation with Stata, Fifth Edition is the essential reference and guide for researchers in all disciplines who wish to write maximum likelihood (ML) estimators in Stata. Beyond providing comprehensive coverage of Stata's command for writing ML estimators, the book presents an overview of the underpinnings of maximum likelihood and how to think about ML estimation. The fifth edition includes a new second chapter that demonstrates the easy-to-use mlexp command. This command allows you to directly specify a likelihood function and perform estimation without any programming. The core of the book focuses on Stata's ml command. It shows you how to take full advantage of ml’s noteworthy features:
When appropriate options are used, many of these features are provided automatically by ml and require no special programming or intervention by the researcher writing the estimator. In later chapters, you will learn how to take advantage of Mata, Stata's matrix programming language. For ease of programming and potential speed improvements, you can write your likelihood-evaluator program in Mata and continue to use ml to control the maximization process. A new chapter in the fifth edition shows how you can use the moptimize() suite of Mata functions if you want to implement your maximum likelihood estimator entirely within Mata. In the final chapter, the authors illustrate the major steps required to get from log-likelihood function to fully operational estimation command. This is done using several different models: logit and probit, linear regression, Weibull regression, the Cox proportional hazards model, random-effects regression, and seemingly unrelated regression. This edition adds a new example of a bivariate Poisson model, a model that is not available otherwise in Stata. The authors provide extensive advice for developing your own estimation commands. With a little care and the help of this book, users will be able to write their own estimation commands—commands that look and behave just like the official estimation commands in Stata. Whether you want to fit a special ML estimator for your own research or wish to write a general-purpose ML estimator for others to use, you need this book. |
||||||||||||||||||||||||||||||||||||||
About the authorsJeff Pitblado is Executive Director, Statistical Software at StataCorp. Pitblado has played a leading role in the development of ml: he added the ability of ml to work with survey data, and he wrote the current implementation of ml in Mata. Brian Poi previously worked as a developer at StataCorp and wrote many popular econometric estimators in Stata. Since then, he has applied his knowledge of econometrics and statistical programming in several areas, including macroeconomic forecasting, credit analytics, and bank stress testing. William Gould is President Emeritus of StataCorp and headed the development of Stata for over 30 years. Gould is also the architect of Mata. |
||||||||||||||||||||||||||||||||||||||
Table of contentsView table of contents >> List of tables
List of figures
Versions of Stata
Notation and typography
1 Theory and practice
1.1 The likelihood-maximization problem
1.2 Likelihood theory
1.2.1 All results are asymptotic
1.3 The maximization problem 1.2.2 Likelihood-ratio tests and Wald tests 1.2.3 The outer product of gradients variance estimator 1.2.4 Robust variance estimates
1.3.1 Numerical root finding
1.4 Monitoring convergence
Newton’s method
1.3.2 Quasi-Newton methods The Newton–Raphson algorithm
The BHHH algorithm
1.3.3 Numerical maximization The DFP and BFGS algorithms 1.3.4 Numerical derivatives 1.3.5 Numerical second derivatives 2 Estimation with mlexp
2.1 Syntax
2.2 Normal linear regression 2.3 Initial values 2.4 Restricted parameters 2.5 Robust standard errors 2.6 The probit model 2.7 Specifying derivatives 2.8 Additional estimation features 2.9 Wrapping up 3 Introduction to ml
3.1 The probit model
3.2 Normal linear regression 3.3 Robust standard errors 3.4 Weighted estimation 3.5 Other features of method-gf0 evaluators 3.6 Limitations 4 Overview of ml
4.1 The terminology of ml
4.2 Equations in ml 4.3 Likelihood-evaluator methods 4.4 Tools for the ml programmer 4.5 Common ml options
4.5.1 Subsamples
4.6 Maximizing your own likelihood functions 4.5.2 Weights 4.5.3 OPG estimates of variance 4.5.4 Robust estimates of variance 4.5.5 Survey data 4.5.6 Constraints 4.5.7 Choosing among the optimization algorithms 4.7 Appendix: More about scalar parameters 5 Method lf
5.1 The linear-form restrictions
5.2 Examples
5.2.1 The probit model
5.3 The importance of generating temporary variables as doubles 5.2.2 Normal linear regression 5.2.3 The Weibull model 5.4 Problems you can safely ignore 5.5 Nonlinear specifications 5.6 The advantages of lf in terms of execution speed 6 Methods lf0, lf1, and lf2
6.1 Comparing these methods
6.2 Outline of evaluators of methods lf0, lf1, and lf2
6.2.1 The todo argument
6.3 Summary of methods lf0, lf1, and lf2 6.2.2 The b argument
Using mleval to obtain equation and free-parameter values
6.2.3 The lnfj argument 6.2.4 Arguments for scores 6.2.5 The H argument
Using mlmatsum to define H
6.2.6 Aside: Stata’s scalars
6.3.1 Method lf0
6.4 Examples 6.3.2 Method lf1 6.3.3 Method lf2
6.4.1 The probit model
6.4.2 Normal linear regression 6.4.3 The Weibull model 7 Methods d0, d1, and d2
7.1 Comparing these methods
7.2 Outline of method d0, d1, and d2 evaluators
7.2.1 The todo argument
7.3 Summary of methods d0, d1, and d2 7.2.2 The b argument 7.2.3 The lnf argument
Using lnf to indicate that the likelihood cannot be calculated
7.2.4 The g argument Using mlsum to define lnf
Using mlvecsum to define g
7.2.5 The H argument
7.3.1 Method d0
7.4 Panel-data likelihoods 7.3.2 Method d1 7.3.3 Method d2
7.4.1 Calculating lnf
7.5 Other models that do not meet the linear-form restrictions 7.4.2 Calculating g 7.4.3 Calculating H
Using mlmatbysum to help define H
8 Debugging likelihood evaluators
8.1 ml check
8.2 Using the debug methods
8.2.1 First derivatives
8.3 ml trace 8.2.2 Second derivatives 9 Setting initial values
9.1 ml search
9.2 ml plot 9.3 ml init 10 Interactive maximization
10.1 The iteration log
10.2 Pressing the Break key 10.3 Maximizing difficult likelihood functions 11 Final results
11.1 Graphing convergence
11.2 Redisplaying output 12 Writing do-files to maximize likelihoods
12.1 The structure of a do-file
12.2 Puttinig the do-file into production 13 Writing ado-files to maximize likelihoods
13.1 Writing estimation commands
13.2 The standard estimation-command outline 13.3 Outline for estimation commands using ml 13.4 Using ml in noninteractive mode
13.4.1 Parsing with help from _get_diopts
13.5 Advice
13.5.1 Syntax
13.5.2 Estimation subsample 13.5.3 Parsing with help from mlopts 13.5.4 Weights 13.5.5 Constant-only model 13.5.6 Initial values 13.5.7 Saving results in e() 13.5.8 Displaying ancillary parameters 13.5.9 Exponentiated coefficients 13.5.10 Offsetting linear equations 13.5.11 Program properties 14 Writing ado-files for survey data analysis
14.1 Program properties
14.2 Writing your own predict command 15 Mata-based likelihood evaluators
15.1 Introductory examples
15.1.1 The probit model
15.2 Evaluator function prototypes 15.1.2 The Weibull model
Method-lf evaluators
15.3 Utilities lf-family evaluators d-family evaluators
Dependent variables
15.4 Random-effects linear regression Obtaining model parameters Summing individual or group-level log likelihoods Calculating the gradient vector Calculating the Hessian
15.4.1 Calculating lnf
15.5 Ado-file considerations 15.4.2 Calculating g 15.4.3 Calculating H 15.4.4 Results at last 16 Mata's moptimize() function
16.1 Introductory examples
16.1.1 The probit model
16.2 Restricting the estimation sample 16.1.2 The Weibull model
16.2.1 Using moptimize_init_touse()
16.3 Estimation preliminaries 16.2.2 Not using moptimize_init_touse()
16.3.1 Weights
16.4 Estimation 16.3.2 Panel data and clusters 16.3.3 Survey data 16.3.4 Initial values 16.5 Results
16.5.1 Displaying results
16.6 Estimation commands 16.5.2 Retrieving results 16.5.3 Storing results in e()
16.6.1 Common maximization options
16.7 Regression redux 16.6.2 Initial values 16.6.3 Constraints 17 Other examples
17.1 The logit model
17.2 The probit model 17.3 Normal linear regression 17.4 The Weibull model 17.5 The Cox proportional hazards model 17.6 The random-effects regression model 17.7 The seemingly unrelated regression model 17.8 A bivariate Poission regression model
17.8.1 A bivariate Poisson distribution
17.9 Epilogue 17.8.2 Bivariate Poisson regression 17.8.3 Discussion A Syntax of mlexp
B Syntax of ml
C Syntax of moptimize()
D Likelihood-evaluator checklists
D.1 Method lf
D.2 Method d0 D.3 Method d1 D.4 Method d2 D.5 Method lf0 D.6 Method lf1 D.7 Method lf2 E Listing of estimation commands
E.1 The logit model
E.2 The probit model E.3 The normal model E.4 The Weibull model E.5 The Cox proportional hazards model E.6 The random-effects regression model E.7 The seemingly unrelated regression model E.8 A bivariate Poisson regression model References
Author index (PDF)
Subject index (PDF)
|
Learn
Free webinars
NetCourses
Classroom and web training
Organizational training
Video tutorials
Third-party courses
Web resources
Teaching with Stata
© Copyright 1996–2025 StataCorp LLC. All rights reserved.
×
We use cookies to ensure that we give you the best experience on our website—to enhance site navigation, to analyze usage, and to assist in our marketing efforts. By continuing to use our site, you consent to the storing of cookies on your device and agree to delivery of content, including web fonts and JavaScript, from third party web services.
Cookie Settings
Last updated: 16 November 2022
StataCorp LLC (StataCorp) strives to provide our users with exceptional products and services. To do so, we must collect personal information from you. This information is necessary to conduct business with our existing and potential customers. We collect and use this information only where we may legally do so. This policy explains what personal information we collect, how we use it, and what rights you have to that information.
These cookies are essential for our website to function and do not store any personally identifiable information. These cookies cannot be disabled.
This website uses cookies to provide you with a better user experience. A cookie is a small piece of data our website stores on a site visitor's hard drive and accesses each time you visit so we can improve your access to our site, better understand how you use our site, and serve you content that may be of interest to you. For instance, we store a cookie when you log in to our shopping cart so that we can maintain your shopping cart should you not complete checkout. These cookies do not directly store your personal information, but they do support the ability to uniquely identify your internet browser and device.
Please note: Clearing your browser cookies at any time will undo preferences saved here. The option selected here will apply only to the device you are currently using.