Note: This page is incomplete and will not be updated in the near future. If you would like to contribute to developing this page, please email idrestat@ucla.edu and we will give you credit for your work. Thank you!
A two-part random-effect model can be used for analyzing longitudinal outcomes with many zeros. Examples of such outcomes are such as the self-reported number of cigarettes a young person consumes reported yearly over a four-year period of time, or the salary amount a person makes observed yearly over a five-year period of time. This type variable has a lot zeros and is also usually skewed. They are referred as semicontinuous variables by Oslen and Schafer (2001). As pointed out in their article, there could be two different but related mechanisms for generating this type of data. One mechanism explains why the outcome is zero and the other mechanism explains the actual values.
In SAS, a two-part random-effect model can be built with proc nlmixed. An example is going to be shown here. The data used for this example is generated using Mplus with Markov Chain Monte Carlo simulation technique. Each subject is observed at 4 time points on an outcome variable and the outcome variable can take zero value over time on many subjects. You can down this sas data set called https://stats.idre.ucla.edu/wp-content/uploads/2016/02/twopart_ex.sas7bdat following the link. If you have trouble with this sas data file, you can also download the ASCII version of the same data set as a comma-separated file following this link.