Announcement

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

  • Error with xttobit Command in Stata When Using ll(0) :"cannot compute an improvement -- discontinuous region encountered, r(430)

    Hello Stata Community,

    I am seeking assistance with an issue in Stata while running a Random Effects Tobit model using the xttobit command.

    The issue arises specifically when I include the lower limit option ll(0).

    The context involves analyzing a dataset of 4.8 million observations on user tipping decisions, where the vast majority ( show no tipping, and a small fraction (8000 observations) show positive tipping amounts.
    This is the summary statistics of my DV

    Click image for larger version

Name:	2.png
Views:	1
Size:	2.9 KB
ID:	1737832


    When I run the following command:

    HTML Code:
    xttobit dv x1 x2, ll(0)
    I encounter the error:
    HTML Code:
    "cannot compute an improvement -- discontinuous region encountered, r(430)."

    However, all the following codes work fine:

    Standard Tobit model without random effects works:

    HTML Code:
    tobit dv x1 x2, ll(0) vce(cluster user)
    Moreover, a Tobit random effects regression without specifying ll(0) also doesn't execute:
    HTML Code:
    xttobit dv x1 x2
    
    This is the error:
    
    initial values not feasible
    r(1400);
    Though, using a subset of my panel where my total observation is 740K, a Tobit RE regression without the ll(0) option runs successfully.
    HTML Code:
    xttobit dv x1 x2
    I also tried a linear random effects regression and it executes without errors:
    HTML Code:
    xtreg dv x1 x2, re

    The issue seems to be specific to using ll(0) with the xttobit command. Could someone provide insights into why this specific error occurs with xttobit when including the ll(0) option, and suggest any potential solutions or workarounds?



    I also attached a screenshot of the code and the error below:
    Click image for larger version

Name:	1.png
Views:	1
Size:	27.9 KB
ID:	1737831



    I really appreciate your help.

    Thanks,

    Mahsa
    Last edited by Mahsa Paridar; 20 Dec 2023, 19:36.

  • #2
    What are the dimensions of N and T in this panel data set? I'm assuming N is very large, T not so large?

    I can't tell how many different values are taken on by i.ugc is; I can guess region does not involve a lot of different dummy variables, but I can't be sure.

    The only reason to prefer xttobit to regular tobit is efficiency, and I doubt that will be important for you. I would use tobit and vce(cluster id), where id I the cross sectional identifier. You need to show more, including your xtset.

    You can use the correlated random effects approach, estimated by pooled Tobit, if you're worried about endogeneity of some explanatory variables.

    JW

    Comment


    • #3
      Thank you so much professor, for the response. I really appreciate it.

      i.ugc specifies the content type which has only 5 levels and region has 10 levels. I ran the model without them and it still has the same problem.

      The number of users is around 2000 and T in my panel is the content that users decide to tip or not(and not day)

      HTML Code:
      xtset user ugc_link_date
      
      Panel variable: user (unbalanced)
       Time variable: ugc_link_date, 1 to 1632207, but with gaps
               Delta: 1 unit


      I actually wanted to try pooled tobit with clustered std. errors and using the individual mean of time-varying vars.

      However, my concern with CRE with pooled Tobit is that the model still has the individual-specific intercept and it doesn't estimate the intercept since it is not RE and it is just a pooled Tobit. It seems to be like a standard Tobit (without RE) with individual means. right? How can I specify RE in CRE with pooled Tobit?

      Thanks,
      Mahsa

      Comment


      • #4
        So N and T are both about 2,000? No wonder xttobit has trouble.

        In my MIT Press book I talk often about how pooled MLEs are not only computationally much simpler, they’re more robust to things like serial correlation. xttobit using RE is still assuming the heterogeneity is uncorrelated with the covariates.

        Comment


        • #5
          Thank you so much for the reply.

          T ranges from 1 to 1632207 for users.

          Can I ask if, by CRE Pooled Tobit, you are referring to the below code where averages are the individual mean of time-varying vars?

          HTML Code:
          tobit  y x1 x2 avg_x1 avg_x2, ll(0) vce(cluster user)
          Would you please elaborate where do we specify the RE in the above code as I thought CRE is a mix of both FE and RE but the above code doesn't specify RE in any part. Am I missing something?


          Best,
          Mahsa

          Comment


          • #6
            One user accounts for 1.6 million observations? đź‘€

            If you want the unobserved heterogeneity to be correlated with the x, use Poisson fixed effects with robust standard errors. If not, you can use pooled Poisson. Or pooled Tobit. The “random effect” is there, but you’re ignoring it because it’s uncorrelated with x. Or include the unit-specific averages.

            Comment


            • #7
              Thank you so much, professor. It was really helpful.

              Best,
              Mahsa

              Comment

              Working...
              X