IDEAS home Printed from
   My bibliography  Save this paper

Maximum Likelihood Estimation of Endogenous Switching And Sample Selection Models for Binary, Count, And Ordinal Variables


  • Alfonso Miranda

    () (Department of Economics, Keele,)

  • Sophia Rabe-Hesketh

    (Graduate Schoolof Education,)


Studying behaviour 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 response 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 paper describes a ‘wrapper’ program, ssm, that calls gllamm (Rabe-Hesketh et al. 2004a) to fit such models. The wrapper accepts data in a simple structure, has a straightforward syntax, and reports output in a manner that is easily interpretable. One important feature of ssm is that the log-likelihood can be evaluated using adaptive quadrature (Rabe- Hesketh and Skrondal 2002; Rabe-Hesketh et al. 2005)

Suggested Citation

  • Alfonso Miranda & Sophia Rabe-Hesketh, 2005. "Maximum Likelihood Estimation of Endogenous Switching And Sample Selection Models for Binary, Count, And Ordinal Variables," Keele Economics Research Papers KERP 2005/14, Centre for Economic Research, Keele University.
  • Handle: RePEc:kee:kerpuk:2005/14

    Download full text from publisher

    File URL:
    Download Restriction: no

    References listed on IDEAS

    1. Hansen, Lars Peter, 1982. "Large Sample Properties of Generalized Method of Moments Estimators," Econometrica, Econometric Society, vol. 50(4), pages 1029-1054, July.
    2. Nicola Anderson & John Sleath, 2001. "New estimates of the UK real and nominal yield curves," Bank of England working papers 126, Bank of England.
    3. Meese, Richard A & Rose, Andrew K, 1990. "Nonlinear, Nonparametric, Nonessential Exchange Rate Estimation," American Economic Review, American Economic Association, vol. 80(2), pages 192-196, May.
    4. Wooldridge, Jeffrey M., 1991. "On the application of robust, regression- based diagnostics to models of conditional means and conditional variances," Journal of Econometrics, Elsevier, vol. 47(1), pages 5-46, January.
    5. Mark Grinblatt, 2001. "An Analytic Solution for Interest Rate Swap Spreads," International Review of Finance, International Review of Finance Ltd., vol. 2(3), pages 113-149.
    6. Gray, Stephen F., 1996. "Modeling the conditional distribution of interest rates as a regime-switching process," Journal of Financial Economics, Elsevier, vol. 42(1), pages 27-62, September.
    7. Diebold, Francis X & Mariano, Roberto S, 2002. "Comparing Predictive Accuracy," Journal of Business & Economic Statistics, American Statistical Association, vol. 20(1), pages 134-144, January.
    8. Duffie, Darrell & Singleton, Kenneth J, 1997. " An Econometric Model of the Term Structure of Interest-Rate Swap Yields," Journal of Finance, American Finance Association, vol. 52(4), pages 1287-1321, September.
    9. Arturo Estrella & Anthony P. Rodrigues & Sebastian Schich, 2003. "How Stable is the Predictive Power of the Yield Curve? Evidence from Germany and the United States," The Review of Economics and Statistics, MIT Press, vol. 85(3), pages 629-644, August.
    10. Franses,Philip Hans & Dijk,Dick van, 2000. "Non-Linear Time Series Models in Empirical Finance," Cambridge Books, Cambridge University Press, number 9780521770415, March.
    11. James H. Stock & Mark W.Watson, 2003. "Forecasting Output and Inflation: The Role of Asset Prices," Journal of Economic Literature, American Economic Association, vol. 41(3), pages 788-829, September.
    12. Ang, Andrew & Bekaert, Geert, 2002. "Regime Switches in Interest Rates," Journal of Business & Economic Statistics, American Statistical Association, vol. 20(2), pages 163-182, April.
    13. Bekaert, Geert & Hodrick, Robert J. & Marshall, David A., 2001. "Peso problem explanations for term structure anomalies," Journal of Monetary Economics, Elsevier, vol. 48(2), pages 241-270, October.
    14. Hamilton, James D, 1989. "A New Approach to the Economic Analysis of Nonstationary Time Series and the Business Cycle," Econometrica, Econometric Society, vol. 57(2), pages 357-384, March.
    15. Perez-Rodriguez, Jorge V. & Torra, Salvador & Andrada-Felix, Julian, 2005. "STAR and ANN models: forecasting performance on the Spanish "Ibex-35" stock index," Journal of Empirical Finance, Elsevier, vol. 12(3), pages 490-509, June.
    16. Diebold, Francis X. & Nason, James A., 1990. "Nonparametric exchange rate prediction?," Journal of International Economics, Elsevier, vol. 28(3-4), pages 315-332, May.
    17. Robin L. Lumsdaine & Eswar S. Prasad, 1997. "Identifying the Common Component in International Economic Fluctuations," NBER Working Papers 5984, National Bureau of Economic Research, Inc.
    18. Weise, Charles L, 1999. "The Asymmetric Effects of Monetary Policy: A Nonlinear Vector Autoregression Approach," Journal of Money, Credit and Banking, Blackwell Publishing, vol. 31(1), pages 85-108, February.
    19. Hamilton, James D., 1988. "Rational-expectations econometric analysis of changes in regime : An investigation of the term structure of interest rates," Journal of Economic Dynamics and Control, Elsevier, vol. 12(2-3), pages 385-423.
    20. Harvey, David & Leybourne, Stephen & Newbold, Paul, 1997. "Testing the equality of prediction mean squared errors," International Journal of Forecasting, Elsevier, vol. 13(2), pages 281-291, June.
    21. Sun, Tong-sheng & Sundaresan, Suresh & Wang, Ching, 1993. "Interest rate swaps: An empirical investigation," Journal of Financial Economics, Elsevier, vol. 34(1), pages 77-99, August.
    22. Duffie, Darrell & Huang, Ming, 1996. " Swap Rates and Credit Quality," Journal of Finance, American Finance Association, vol. 51(3), pages 921-949, July.
    23. Gencay, Ramazan, 1999. "Linear, non-linear and essential foreign exchange rate prediction with simple technical trading rules," Journal of International Economics, Elsevier, vol. 47(1), pages 91-107, February.
    24. Lang, Larry H. P. & Litzenberger, Robert H. & Luchuan Liu, Andy, 1998. "Determinants of interest rate swap spreads," Journal of Banking & Finance, Elsevier, vol. 22(12), pages 1507-1532, December.
    Full references (including those not matched with items on IDEAS)


    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.

    Cited by:

    1. repec:ebl:ecbull:v:3:y:2008:i:42:p:1-13 is not listed on IDEAS
    2. Cornelissen, Thomas & Heywood, John S. & Jirjahn, Uwe, 2011. "Performance pay, risk attitudes and job satisfaction," Labour Economics, Elsevier, vol. 18(2), pages 229-239, April.
    3. Dawson, Peter & Jones, Philip, 2010. "How are They Spending my Taxes? Tax Compliance and Citizens’ Interest in Politics," Department of Economics Working Papers 21047, University of Bath, Department of Economics.
    4. Broström, Anders, 2010. "Working with distant researchers--Distance and content in university-industry interaction," Research Policy, Elsevier, vol. 39(10), pages 1311-1320, December.
    5. Romero-Medina, Antonio & Alonso-Borrego, César, 2008. "Students' assessment of higher education in Spain," UC3M Working papers. Economics we084823, Universidad Carlos III de Madrid. Departamento de Economía.
    6. David Roodman, 2011. "Fitting fully observed recursive mixed-process models with cmp," Stata Journal, StataCorp LP, vol. 11(2), pages 159-206, June.
    7. David Roodman, 2009. "Estimating Fully Observed Recursive Mixed-Process Models with cmp," Working Papers 168, Center for Global Development.
    8. Ehsan Khoman & James Mitchell & Martin Weale, 2008. "Incidence-based estimates of life expectancy of the healthy for the UK: coherence between transition probabilities and aggregate life-tables," Journal of the Royal Statistical Society Series A, Royal Statistical Society, vol. 171(1), pages 203-222.
    9. Chawanote, Chayanee, 2012. "Rural Household Non-farm Businesses: Startup, Expansion, Contraction, or Exit?," 2012 Annual Meeting, August 12-14, 2012, Seattle, Washington 124841, Agricultural and Applied Economics Association.
    10. César Alonso-Borrego & Antonio Romero-Medina, 2016. "Wage Expectations for Higher Education Students in Spain," LABOUR, CEIS, vol. 30(1), pages 1-17, March.
    11. Omar Paccagnella, 2011. "Anchoring vignettes with sample selection due to non‐response," Journal of the Royal Statistical Society Series A, Royal Statistical Society, vol. 174(3), pages 665-687, July.
    12. Sakurai, Takeshi, 2013. "Intensification of Lowland Cropping Systems and Informal Land Ownership in West Africa: Comparison of Two Large Inland Markets in Côte d’Ivoire and Ghana," Discussion Paper Series 586, Institute of Economic Research, Hitotsubashi University.
    13. repec:eid:wpaper:11/10 is not listed on IDEAS

    More about this item


    Endogenous switching; sample selection; binary variable; count data; ordinal variable; probit; poisson regression; adaptive quadrature; gllamm; wrapper; ssm.;

    JEL classification:

    • C13 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods and Methodology: General - - - Estimation: General
    • C31 - Mathematical and Quantitative Methods - - Multiple or Simultaneous Equation Models; Multiple Variables - - - Cross-Sectional Models; Spatial Models; Treatment Effect Models; Quantile Regressions; Social Interaction Models
    • C35 - Mathematical and Quantitative Methods - - Multiple or Simultaneous Equation Models; Multiple Variables - - - Discrete Regression and Qualitative Choice Models; Discrete Regressors; Proportions
    • C87 - Mathematical and Quantitative Methods - - Data Collection and Data Estimation Methodology; Computer Programs - - - Econometric Software
    • I12 - Health, Education, and Welfare - - Health - - - Health Behavior

    NEP fields

    This paper has been announced in the following NEP Reports:


    Access and download statistics


    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:kee:kerpuk:2005/14. See general information about how to correct material in RePEc.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: (Martin E. Diedrich). General contact details of provider: .

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service hosted by the Research Division of the Federal Reserve Bank of St. Louis . RePEc uses bibliographic data supplied by the respective publishers.