Home  /  Training  /  Classroom and web-based training courses  /  Multilevel/mixed models using Stata

Multilevel/mixed models using Stata


Learn how to fit multilevel/mixed models in Stata. Mixed models contain both fixed effects analogous to the coefficients in standard regression models and random effects not directly estimated but instead summarized through the unique elements of their variance–covariance matrix. Mixed models may contain multiple levels of nested random effects. These models are also referred to as multilevel or hierarchical models.

The course will be interactive, use real data, and offer ample opportunity for specific research questions and for working exercises to reinforce what is learned.

Are you more interested in panel-data models with unobserved individual-level heterogeneity, endogenous variables or lagged variables? Check out our Panel-data analysis using Stata course.

Price: $1,395   Enroll now

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

Course leader

Meghan Cain portrait

Meghan Cain is a Senior Statistician at StataCorp. She earned her PhD in quantitative psychology from the University of Notre Dame, where her research focused on structural equation modeling, multilevel modeling, and Bayesian statistics. At Stata, she develops and presents training on these and other topics. She also conducts webinars, works with developers to produce Stata documentation, and contributes to Stata blogs.

The course was great—exactly what I was looking for. The instructor did an excellent job making difficult concepts easy to understand, showing us tricks in using Stata, and she also skillfully answered many difficult questions.
Dr. William Mangino
Associate Professor of Sociology
Hofstra University

Course topics

  • Modeling clustered data
    • The random-intercept model
    • The within estimator versus the generalized least squares (GLS) estimator; the Hausman test
    • Maximum likelihood and restricted maximum likelihood
    • Using the mixed and xtreg commands for the random-intercept model
    • Small sample inference for fixed effects in mixed models
  • The random coefficients model
    • Adding random coefficients
    • Covariance structures for random effects
    • Specifying models hierarchically
    • Growth curves
  • More complex models
    • Multiple-level models
    • Crossed-effects models
    • Complex and grouped constraints on variance components
    • Heteroskedastic errors
    • Alternate error structures
  • Binary and count responses
    • Models for binary and count responses
    • Estimation via adaptive Gaussian quadrature
    • Model building using the Laplacian approximation
  • Predictions, model diagnostics, and other postestimation tasks
    • Empirical Bayes predictions
    • Residuals
    • Fit diagnostics
    • Diagnostic plots
    • Cataloging and comparing mixed-model results in Stata
    • Likelihood-ratio (LR) tests


Knowledge of linear regression and a working knowledge of Stata.

Next session

Course Dates Location Cost Enroll
Multilevel/mixed models using Stata 19–22 June 2023 Web based
Web-based training offers the same great content as our classroom training. And just like our classroom training, web-based training is designed to be interactive. Watch and listen from your computer as the instructor teaches; follow along in your printed notes; ask the instructor questions; and work examples using Stata. The differences are that you attend web-based training courses in the comfort of your own home or office and that courses are divided into three- to four-hour sessions that take place over consecutive days.

$1,395 Enroll

 Please notify me 

Inform me of the next offering of Multilevel/mixed models using 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 no-reply@stata.com 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 is offered in both classroom and web-based settings.

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; the breakfast is available before the course begins.

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.