Announcement

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

  • melogit "cannot compute an improvement -- discontinuous region encountered" STATA 14.1

    Hello everybody,

    I checked for update this morning and update my STATA 14 to STATA 14.1. Tonight my melogit doesn't run anymore "cannot compute an improvement -- discontinuous region encountered".
    I didn't change anything in my code and the the update is my only explanation.

    I read on other forum that it seems that I am not the only one to have this problem with STATA update.

    I checked my model building and it started alread with this univariable analysis:
    melogit Sum_Mo i.CatQ || Num: || TVD:, binomial(Q_Mo) or

    I ran this model in may and the overall p-value of CatQ was 0.0002 and now it doesn't run anymore.
    Any advice, please??

  • #2
    -meqrlogit- fits the same models as -melogit- and sometimes will succeed where -melogit- fails because it uses a different estimation algorithm. Give it a try.

    Comment


    • #3
      Thank you, Clyde.
      It worked. You have spared me so much time tonight. Thank you.

      Comment


      • #4
        Hello, I realize this post is quite old, but the title of the thread brought me here as I am having a similar problem. I am trying to do an meologit model for an ordered independent variable. When I run the model, it goes until Iteration 147: log likelihood = -459.63626 and then gives me the message "cannot compute an improvement -- discontinuous region encountered". The command I'm using is "meglm fuel_type family_size || householdID:, family(ordinal) link(logit) or" I've tried this before using the meologit command which just gave me a never ending number of thousands of iterations. My ordered dependent variable is from 0-2.

        Please let me know if you know what a solution to this problem may be for me.

        Thanks!

        Comment


        • #5
          These are difficult problems. The likelihood for this kind of model is very complicated and finding a maximum is frequently difficult. With ordinal logit, as opposed to ordinary logit, there is no alternative command analogous to -meqrlogit- to bail you out. Since your model is already rather bare bones, simplifying the model doesn't seem like a fruitful approach here.

          The best I can think to advise, and it may not work, is to first run the single-level -ologit- model and use the results of that as a starting point for the -meologit- estimation using the -from()- option. See -help meologit##maximize_options- for more information about using -from()-. Also consider using the -difficult- option, or specifying a different maximization algorithm in the -technique()- option. It's a matter of trial and error. Usually something will work. Occasionally, you are just stuck.

          Comment


          • #6
            What strikes me is that you have household ID as the second-level identifier. And family size as the—I guess, continuous—predictor.

            On average, how many observations do you have per household? From the names of these two variables, it would seem that you have nearly cross-sectional data.

            Moreover, "fuel type" doesn't really sound as if its an ordered category.

            Comment


            • #7
              Hi Clyde, that's so much for responding to my inquiry! I haven't able to try and solve things yet as I had to take a break from analysis the last week, but I'm getting back into it right now. I will let you know how it goes for me!

              Joseph, the data is indeed from a cross sectional study in which participants were chosen randomly from households across several villages. I am using fuel type as an ordered category with 3 categories starting with 1 - "dirty" fuels, then 2 -a mix of "dirty" and "clean", to 3 - just "clean", based on transitioning of fuel type use up the energy ladder. Yes, family size is a continuous predictor representing the number of people in a household. The householdID represents what household a participant comes from. There are many repetitions of households usually as pairs of participants meaning that an observed household size and the fuel type outcome will be repeated for different participants. To account for this due to the nesting of some pairs of participants into households, we have chosen to add mixed-effects. Standard ologit models without mixed-effects have turned out great, but I am afraid are biased because of the repetitions. Total of participants is 531, with 50 households repeated in pairs, 3 in triplets, and 2 in quadruplets. That would mean 25, 6, and 6 repetitions of household data amounting to 37 repeated predictors - outcomes of 531. I suppose that I could just delete the repeated households, but I'd rather adjust for it in the modeling. Apart from family size I have 20 other predictors, some also continuous, some categorical.

              Comment


              • #8
                After having trouble with meologit with mixed effects for individuals nestled into households, I was able to play around with different maximization options and ended up having "success" with one of my independent variables after preforming a regular ologit, then getting starting values for matrix b. With that I was able to do the whole model including the nesting for households then using the from() command with b and skip.

                Code:
                ologit fuel_type i.education_headmalex
                matrix b = e(b)
                meologit fuel_type i.education_headmalex || house_group:, from(b, skip)
                After running 887 iterations (which is better than never ending), I was actually given coefficient values for the first time. Unfortunately (or maybe not), I was accompanied by the following message: Note: The above coefficient values are the result of non-adaptive quadrature because the adaptive parameters could not be computed.

                I'm not sure if this is bad because it was non-adaptive quadrature, or if it is good, because at least it is something that completed fully without any errors. The coefficient values, standard error, and p-values turned out great, but for the var_cons the coefficient value was 8983 the standard error 3539, which just doesn't look good to me.

                Anybody know if I'm headed in the right direction?

                Comment


                • #9
                  That looks kind of suspect to me as well. I don't really know what to tell you, though. If you show the entire -meologit- output, I might be able to spot something that sheds light on it. No promises, though.

                  Comment


                  • #10
                    very well this model works for me!

                    Comment

                    Working...
                    X