Announcement

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

  • cmp models with zero-inflation

    I have recently started using cmp models which I find to be very much useful in building multivariate models with different distributions and sample selection. I would like to know if there is a way to add zero-inflation to the corresponding models such as ordered probit using cmp so that we can use mutivariate models with zero inflation.

  • #2
    In principle, yes. But cmp cannot fit the models that I think are most often zero-inflated--it can't do Poisson or negative binomial.

    A positive example is the "craggit" model, which is an alternative to tobit. Type "findit craggit" to find a program just for that model (William Burke, Stata Journal, volume 9, number 4). Here's an example of cmp replicating it:

    Code:
    use http://www.stata-journal.com/software/sj9-4/st0179/zam_fert_ex.dta, clear
    
    craggit basal_g disttown cland educ age, sec(qbasal_g disttown cland educ age)
    
    cmp setup
    cmp (basal_g=disttown cland educ age) (qbasal_g=disttown cland educ age, trunc(0 .)), ind($cmp_probit $cmp_trunc) cov(ind) nolr
    You have to make the two equations' errors independent. Otherwise the best fit drives the correlation between them to 1, and actually never converges.

    Comment


    • #3
      Thank you David Roodman . I will definitely try the craggit (Cragg's Tobit alternative) and the corresponding Tobit model. Do correct me if I am wrong, I guess Tobit and Zero-inflated models are different.

      Is it possible to replicate a zioprobit (zero-inflated ordered probit model) using a cmp model similar to the way how you have specified the truncated model? I am asking this because I can probably then use this to build multivariate models involving zioprobit and also if possible allow for correlation between the inflation and the ordered probit component.

      Comment


      • #4
        Yes, you should be able to do a zioprobit that way.

        Comment


        • #5
          David Roodman: Hi David. Sorry to piggyback on an existing question.
          I am in a situation where my analysis requires both -mepoisson- and selection modelling.

          Is there a way that I can modify the above -cmp- alternative for -craggit- and include -Heckman- as well?
          Thank you.

          Comment


          • #6
            This one is tricky. The craggit model requires that the error in the equation for the magnitude, as distinct from the equation for whether an observation is uncensored, must be independent of censoring, as discussed in the craggit paper. That's why the example above has "cov(ind)"--the covariance between the two equations' error terms is independent. But now we want to add a selection equation and have its error term be correlated with at least one of those equations, which is essential for Heckman modeling. So we need to exercise finer control over the covariance structure.

            This seems to work:
            Code:
             use http://www.stata-journal.com/software/sj9-4/st0179/zam_fert_ex.dta, clear  
             gen z = runiform()<.5  // determinant of selection gen selected = z + rnormal()>.5  // selection dummy  constraint 1 [atanhrho_12]_cons // treat errors in first two equations as independent, don't estimate correlation between them constraint 2 [atanhrho_23]_cons // make error in magnitude equation independent of error in selection equation too  cmp setup cmp (basal_g=disttown cland educ age) (qbasal_g=disttown cland educ age, trunc(0 .)) (selected = z), ind($cmp_probit*selected $cmp_trunc*selected $cmp_probit) constraint(1 2) nolr
            This allows the selection equation error to be correlated with the censoring equation error, so in principle it allows correction of the censoring equation for selection.

            Comment


            • #7
              David Roodman : Thank you so much for your immediate response :-) Will try this out :-)

              Comment

              Working...
              X