Home  /  Training  /  Classroom and web-based training courses  /  Programming Estimation Commands in Stata

Programming Estimation Commands in Stata


Learn everything you need to write your own estimation commands in Stata including linear estimators, nonlinear estimators, estimators based on maximum likelihood, and estimators based on the generalized method of moments (GMM).

Learn how to make your command behave just like an official Stata command.

This course shows how to write an estimation command for Stata. No Stata or Mata programming experience is required. After providing an introduction to basic Stata do-file programming, the course covers basic and advanced ado-file programming. Next the course provides an introduction to Mata, the byte-compiled matrix language that is part of Stata. Then the course shows how to implement linear and nonlinear statistical methods in Stata/Mata programs. Finally, the course discusses using Monte Carlo simulations to test the implementation. Exercises will supplement the lectures and Stata examples.

Price: $1,295  

We offer a 15% discount for group enrollments of three or more participants.

Course topics

  • Day 1
    • The syntax of Stata estimation commands
    • Basic Stata programming
    • Programming an estimation command in Stata
    • An introduction to the Mata matrix language
  • Day 2
    • A further introduction to the Mata matrix language
    • Basic Stata/Mata programming
    • Using optimize() to implement nonlinear statistical estimators in Stata/Mata programs
    • Testing a command by Monte Carlo simulation


A general familiarity with Stata and a graduate-level course in regression analysis or comparable experience.

Next session

Currently, there are no scheduled sessions of this course.

 Please notify me 

Inform me of the next offering of Programming Estimation Commands in Stata.




Yes, I would like to receive emails regarding the following:

We appreciate that our users do not want to be inundated with email. Those who sign up to receive emails can anticipate receiving no more than a couple in a month. For example, someone who signs up to be informed of Stata Conferences may receive four emails in one year.

To ensure delivery of emails to your inbox, add [email protected] to your address book.

Do you want to be notified of all upcoming training opportunities? Sign up for our convenient email alerts.


Enrollment is limited. This course may be offered in a classroom or web-based setting. The type (classroom or web-based) will be designated above when scheduled.

Classroom training courses are two-day courses that run from 8:30 a.m. to 4:30 p.m. each day. These courses take place at a training center where computers with Stata installed are provided. A continental breakfast, lunch, and an afternoon snack will also be provided.

Web-based training courses are four-day courses that run for three and a half hours each day. You will be provided with a temporary Stata license to install on your computer, a printed copy of the course notes, and all the course datasets so that you can easily follow along. Learn more about how our web-based training courses work, watch a video demonstration, and find technical requirements for participating in this type of training.