Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • IVCLOGLOG: New Stata Command for Estimating a Complementary Log-Log Model with Continuous Endogenous Covariates

    Dear all,

    I am happy to announce the release of my new Stata package ivcloglog (v1.0.0). It is the cloglog version of ivprobit, twostep. It estimates a complementary log-log model with instrumenting of continuous endogenous covariates via the control function approach (also known as 2SRI – two-stage residuals inclusion). This just means that transformed versions of the residuals of the first stage regressions (i.e., the "auxiliary models") are included as regressors in the second stage (i.e., the "primary model"). In the case of ivcloglog, a linear first stage and polynomial control functions are used - the latter just means that powers of the residuals are used.

    An important use case is that ivcloglog allows users to easily estimate a Prentice and Gloeckler (1978) discrete-data proportional hazards model with continuous endogenous covariates, just like how the basic version of the model (i.e., with all covariates exogenous) can be estimated using cloglog.

    The Prentice and Gloeckler (1978) discrete-data proportional hazards model is a flexibly parametric survival model for discrete-time data that is analogous to Cox's (1972) continuous-time proportional hazards model. Estimation is simple and only takes a few steps:
    1. If not the case already, format the data as a panel (typically unbalanced) where the observations for each entity i end after event occurrence. In a panel, this means dropping observations after event occurrence.
    2. If not the case already, generate the outcome variable – a binary indicator for event occurrence that is 1 in the time period of the event and 0 otherwise.
    3. Using the resulting dataset, simply run ivcloglog using the aforementioned outcome variable and with time fixed effects included as controls (and your choice of other controls and instruments).
    For more information, I highly recommend taking a look at the mutually complementary Liu (2023) and Palmer (2023). Liu (2023) is a theory guide and Palmer (2023) is an empirical guide with a real-data application to loan default. You can install the package using:
    Code:
    ssc install ivcloglog
    The minimum required Stata version is 14.0. The sole dependency is moremata, available through SSC using:
    Code:
    ssc install moremata
    A highly detailed help file is available, and I highly recommend reading it to get started. Simply type:
    Code:
    help ivcloglog
    References:
    • Liu, W. (2023) A theory guide: Instrumenting a discrete-data proportional hazards model with control functions. Working Paper. (Will be available on arXiv in the future.)
    • Palmer, C. (2023) An IV hazard model of loan default with an application to subprime mortgage cohorts. MIT Working Paper. http://mit.edu/cjpalmer/www/Palmer-IVHazard.pdf
    • Prentice, R. L., & Gloeckler, L. A. (1978). Regression analysis of grouped survival data with application to breast cancer data. Biometrics, 57-67.
Working...
X