Announcement

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

  • Error message: Cannot compute an improvement -- discontinuous region encountered (for panel ordered logit/probit model)

    I have panel data for OECD countries between the years 2010 and 2021.

    I categorize GINI into 4 groups as follows
    Click image for larger version

Name:	c.png
Views:	2
Size:	13.2 KB
ID:	1672780
    This is named as d_gini, which is my dependent variable. And I regress it on World Pandemic Discussion Index (WPDI) as follows:
    Click image for larger version

Name:	Screen Shot 2022-07-08 at 9.08.54 PM.png
Views:	1
Size:	31.1 KB
ID:	1672781


    But, regardless of probit or logit model, I encounter with this error. How can I fix it?

    Thank you.


    PS: I find such a solution. https://www.statalist.org/forums/for...on-encountered

    But I cannot adopt this solution to my analysis.

    Last edited by Sean Bilic; 08 Jul 2022, 12:30.

  • #2
    Note: When I try this panel ordered logit regression with different explanatory variable, for example I use log_GDP in stead of WPDI, this regression works. I don't see any error. However, I need to use this explanatory variable WPDI. How can I fix?

    Comment


    • #3
      Originally posted by Sean Bilic View Post
      I have panel data for OECD countries between the years 2010 and 2021.

      I categorize GINI into 4 groups
      You start off with a variable that is continuous over the unit interval and then you categorize it. Is there a reason why you do this instead of analyzing it in its original scale?

      Note: When I try this panel ordered logit regression with different explanatory variable, for example I use log_GDP in stead of WPDI, this regression works. I don't see any error. However, I need to use this explanatory variable WPDI. How can I fix?
      Can you show the result of

      Code:
      sum WPDI

      Comment


      • #4
        Originally posted by Andrew Musau View Post

        You start off with a variable that is continuous over the unit interval and then you categorize it. Is there a reason why you do this instead of analyzing it in its original scale?



        Can you show the result of

        Code:
        sum WPDI
        Click image for larger version

Name:	Screen Shot 2022-07-09 at 11.10.31 AM.png
Views:	1
Size:	54.8 KB
ID:	1672835



        All variables are like that. (Note: two LFP variables in the bottom of the table are not used. )

        note: dgini and d_gini are the same, I have changed for a trail.
        Last edited by Sean Bilic; 09 Jul 2022, 02:19.

        Comment


        • #5
          My guess is that you have too many zero values for this variable. Maybe you can also show the following figure:

          Code:
          hist WPDI, discrete

          Comment


          • #6
            Originally posted by Andrew Musau View Post
            My guess is that you have too many zero values for this variable. Maybe you can also show the following figure:

            Code:
            hist WPDI, discrete
            Yes you are right. For each country, only 10 of 12 observations are zero. How can I fix this problem?
            Click image for larger version

Name:	Screen Shot 2022-07-09 at 11.26.39 AM.png
Views:	1
Size:	22.4 KB
ID:	1672838

            Comment


            • #7
              I do not think that there is anything to fix, the variable just does not have much variation. From the link you referenced in #1, you can try gllamm with the -adapt- option as below to see if it helps:

              Code:
              ssc install gllamm, replace
              gllamm d_gini WPDI, i(Country_id) link(ologit) adapt
              But, you still did not answer my question in #3:

              You start off with a variable that is continuous over the unit interval and then you categorize it. Is there a reason why you do this instead of analyzing it in its original scale?
              It is poor statistical practice to categorize continuous variables if there is no rationale behind doing so as you are throwing away information. In that case, you may solve your problem by analyzing the outcome in its original scale.
              Last edited by Andrew Musau; 09 Jul 2022, 03:18.

              Comment


              • #8
                Sean:
                Andrew's excellent advice is well covered in statistical literature (see, free of charge, http://citeseerx.ist.psu.edu/viewdoc...=rep1&type=pdf).
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment


                • #9
                  Please note our policy on cross-posting, which is that you should tell us about it. Similar points are being made to your postings on Reddit.

                  FAQ Advice #8

                  Comment


                  • #10
                    Also note that we (mainly I) ask a lot to show data examples using dataex and to put your results in
                    Code:
                    Code delimiters.
                    screenshots are unclear (usually) and are just not optimal in 99.9% of cases. You can literally just put your output in between code delimiters, and it shows us exactly how it looks on your screen, no uploading or taking pictures needed. i get that pictures and descriptions are well intentioned, but they're just not helpful to us helping you.

                    Comment


                    • #11
                      Correction to #9: Stack Overflow not Reddit.

                      Comment

                      Working...
                      X