Studying behavior in economics, sociology, and statistics often involves
fitting models in which the response variable depends on a dummy variable- also
known as a regime-switch variable- or in which the response variable is observed
only if a particular selection condition is met. In either case, standard regression
techniques deliver inconsistent estimators if unobserved factors that affect the re-
sponse are correlated with unobserved factors that affect the switching or selection
variable. Consistent estimators can be obtained by maximum likelihood estimation
of a joint model of the outcome and switching or selection variable. This article
describes a “wrapper” program, ssm, that calls gllamm (Rabe-Hesketh, Skrondal,
and Pickles, GLLAMM Manual [University of California – Berkeley, Division of Bio-
statistics, Working Paper Series, Paper No. 160]) to fit such models. The wrapper
accepts data in a simple structure, has a straightforward syntax, and reports out-
put that is easily interpretable. One important feature of ssm is that the log
likelihood can be evaluated using adaptive quadrature (Rabe-Hesketh, Skrondal,
and Pickles, Stata Journal 2: 1–21; Journal of Econometrics 128: 301–323).
Copyright 2006 by StataCorp LP.