 »  Home »  Products »  Training »  NetCourses »  NC200: Maximum likelihood estimation with Stata

## NetCourseTM 200: Maximum likelihood estimation with Stata

 Content: Estimation of user-defined models via maximum likelihood. Includes overview of theory, explanation of how optimizers work, and practical coding considerations. Course leaders: William Gould, President of StataCorp and Head of Development. Course length: 7 weeks (5 lectures) Price: \$125 Prerequisites: Stata 7, installed and working. Course content of NetCourse 151 or equivalent knowledge. Editor or word processor with which you are familiar and that can save and edit plain text files; if you have Stata for Windows or Stata for Mac, these include an editor. (Course is platform independent.)

### This syllabus is for the Stata 5.0 NetCourse 200 — it will be rewritten when we offer the course for Stata 7.0.

Syllabus:

Lecture 1: Background on maximum likelihood estimators

• Maximum likelihood theory
• The likelihood function
• The rationale of ML estimates (consistency and asymptotic normality)
• Why inverse of second derivatives gives the variances
• Why likelihood-ratio tests are better than Wald tests
• Robust variance estimates
• Numerical optimization
• How numerical optimizers work
• Why -g*inv(H) is a good direction to go
• Setting stepsize
• How numerical derivatives are calculated
• Declaring convergence
 Note:   Lecture 1 does not concern Stata per se. This lecture focuses on the rationale of maximum likelihood estimation and the numerical issues involved. Emphasis is on practice and providing the background to knowledgeably discuss maximum likelihood estimates and variance estimates, and how to diagnose problems. Lectures 2 to 5 concern estimation with Stata.
Lecture 2: Introduction to Stata's ml commands and how to program the linear-form (lf) method
• Overview of Stata's maximizers
• The linear-form (lf) simplification
• Advantages of the lf method
• Practical programming of the lf method
• Multiple equations
• Ancillary parameters
• Reparameterization
• Specifying initial values

There is an additional one-week break between Lectures 2 and 3 in this course to allow extra time for discussion.
Lecture 3: Maximization of general likelihood functions without analytic derivatives (the deriv0 method)
• The deriv0 method
• Programming with scalars, vectors, and matrices in Stata
• The deriv0 likelihood-evaluation program
• Debugging
• Specifying initial values
• Panel-data estimators
• Complex likelihood functions

Lecture 4: Maximization with analytic derivatives (the deriv1 and deriv2 methods)

• The deriv1 and deriv2 methods
• Using Stata's matrix programming language to calculate derivatives
• Establishing that the derivatives are right
• Ancillary parameters
• Comparison of deriv1 and deriv2 with deriv0 and lf
Lecture 5: Robust variance estimator
• Robust (Huber/White/sandwich/survey design-based) variance estimates
• Sketch of the theory of the robust variance estimator
• Understanding the computation of the robust variance estimator
• Implementing the robust variance estimator using the _robust command
• Robust variance estimates for clusters
• Pitfalls of the robust variance estimator for clusters: no free lunch
• Complex survey data

Back to NetCourses