About xxM

xxM is a package for multilevel structural equation modeling (ML-SEM) with complex dependent data structures.  xxM implements a modeling framework called n-Level Structural Equation Modeling (NL-SEM) and can estimate models with any number of levels.  Observed and latent variables are allowed at all levels.

Data structures

  • Hierarchically nested data (e.g., students << classrooms << schools << districts).
  • Cross-classified data (e.g., students crossed within schools and neighborhoods).
  • Partial nesting (e.g., only at-risk students in a classroom receive additional instruction by a tutor).
  • Longitudinal data (long or wide).
  • Longitudinal data with switching classification (e.g., students changing classrooms/teachers over time).
  • Round-robin design (e.g., each person rates every other person in a small group).
  • 360 performance evaluation data.
  • A combination of above structures for different level pairs.


  • Multilevel models (MLM) with random effects of observed variables (e.g., MLwiN, HLM).
  • Multilevel structural equation models (ML-SEM) with observed and latent variables at all levels. (e.g., Mplus, GLLAMM)
  • Linear Mixed-Effects Models (LME) with constraints on both G and R side of the model. (e.g., lme4: lmer, SAS: HPMixed)
  • Linear Growth Curve (LGC) Models.
  • David Kenny’s Social Relations Model (SRM) for reciprocal dyadic ratings.


  • Efficient maximum Likelihood (ML) estimation.
  • Profile-likelihood confidence intervals (CI).
  • Fixed-to-constant and equality constraints on model parameters.
  • Designed for very large datasets. Works well with small datasets as well.


  • ‘If you can draw the model, you can build the model’. Graphical representation of NL-SEM models is intuitive.
  • ‘If you can build a toy model, you can build a skyscraper’. Models are constructed using a ‘building-block’ approach.


  • xxM reference manual documents all commands and packaged datasets.
  • xxM user’s guide provides examples of NL-SEM models.
  • Additional examples of ‘live’ xxM model fitting sessions are available on the site.


  • Discussion forum.


  • Priceless!



Development of xxM was made possible by a generous grant (R305D090024) from the Institute of Education Sciences, U.S. Department of Education awarded to Paras D. Mehta.


  • paras [dot] mehta [at] times [dot] uh [dot] edu