Abstract
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 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. Copyright 2006 by StataCorp LP.