Traj estimates a discrete mixture model for clustering of longitudinal data series. Groups may represent distinct subpopulations or alternatively, components of a discrete approximation for a potentially complex data distribution.


Supported distributions are: censored (or regular) normal, zero inflated (or regular) Poisson, and Bernoulli distributions (logistic model). The censored normal model is useful for psychometric scale data with censoring at a scale minimum and/or scale maximum, the zero inflated Poisson model useful for count data with more zeros than would be expected under the Poisson assumption, the Bernoulli model useful for 0/1 data, and the Beta model for continuous data bounded in the [0,1] interval. The model is appropriate for data with average values changing smoothly as a function of the dependent variable (time, age, ...). Some sharp changes can be handled through the inclusion of time dependent covariates.

To install the Stata version:

net from

net install traj

help traj


A SAS procedure based on mixture models for estimating developmental trajectories.

Advances in group-based trajectory modeling and a SAS procedure for estimating them.

A note on a Stata plugin for estimating group-based trajectory models.

Group-based multi-trajectory modeling.

Group-based Trajectory Modeling Extended to Account for Nonrandom Participant Attrition.

A novel methodological framework for multimodality, trajectory model-based prognostication.

Using the Beta distribution in group-based trajectory models

Group-Based Trajectory Modeling in Clinical Research


traj is open source licensed under

the 3-Clause BSD License (Open Source Initiative).


Copyright 2021 Bobby L. Jones.