Announcement

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

  • meologit problem with "initial values not feasible"


    Dear Statalists,
    I encounter the "initial values not feasible" problem when running multi-level ordered logit regression based on U.S. Behavioral Risk Factor Surveillance System dataset.
    Independent varialbes are income category, sex, marital status, education level, employment status, and house tenure, the second level is states, the outcome is the memory loss or not.

    Below is my code:
    meologit ormemlos i.sex i.marital i.educa i.renthom1 i.employ1 i.income2|| state_name:, nolog or
    But it encounters with "initial values not feasible" as picture shown below(also included the ordered outcome variables):
    Click image for larger version

Name:	delete.JPG
Views:	1
Size:	86.0 KB
ID:	1398352




    I have tried shortening my independent variables, only keep i.sex, and find it work.
    Click image for larger version

Name:	delete.JPG
Views:	1
Size:	225.1 KB
ID:	1398348





    Though I have read some post with "initial values not feasible", I cannot figure out how to solve my problem. I was wondering someone could help me out?


    All the best,
    Last edited by Zhicheng Wang; 18 Jun 2017, 10:37. Reason: change grammar errors and update pictures

  • #2
    Administrative bump. Post failed to display properly.

    Comment


    • #3
      There are a few things you can do, none guaranteed to work, but often one of them will.

      1. Simplify the model by removing variables one at a time until you get to one that runs. Then use e(b) from that in the -from()- option (with the -skip- suboption) to specify starting values for the next model. The next model adds back one variable from among those that were omitted. If that works, then use the e(b) from that in the -from()- option again, adding yet another variable back. Iterate until failure or until complete model runs.

      2. Run the model with just -ologit- and use e(b) from that as starting values for -meologit-.

      3. See help meglm##startvalues().

      Comment


      • #4
        Dear Clyde,
        Thank you so much for answering my question. After referring to the multilevel-stata-15 manual. I sorted it out!

        Comment


        • #5
          Dear Clyde
          I am having the sample problem with an xtlogit model in the imputed dataset. I have tried to run a simple model with only one variable but it doesn't run at all. my command is as follows

          mi xtset hosp2
          or: xtlogit pci i.lab i.hxami i.hxangina i.htn i.choles i.pvd i.cva i.asthama_copd i.crf i.hf i.smoking i.dm i.prevpci i.prevcabg i.bb c.age i.gender i.year i.ethnicity

          I am getting following error and the model doesn't run at all


          . mi estimate, or: xtlogit pci i.lab c.bmi i.hxami i.hxangina i.htn i.choles i.pvd i.cva i.asthama_copd i.crf i.hf i.smoking i.dm i.prevpci i.prevcabg c.age i.gender i.year i.ethnicity
          initial values not feasible an error occurred when mi estimate executed xtlogit on m=1

          Comment


          • #6
            There are some problems that have no solution. I say this just to caution that, at the end of the day, this may be one of those.

            That said, the first thing I would do here is see if the -xtlogit- command will run and reach convergence without the -mi estimate-. Try running -xtlogit- on just the unimputed data.

            The next step is to simplify the model. I would start by ordering my predictor variables in order of importance from most important to my research goals down to least important to my research goals. I would then start trying the model with just the outcome and most important predictor. Most likely that will run without difficulty. Then I would continue to add back predictors, one at a time, in order of decreasing importance, and keep going until the estimation fails.

            Once you have determined that some particular variable breaks your model, you might then look at the distribution of that variable, both marginal and conditional on each outcome to see if there is something pathological there or something to suggest errors in the data. If there is something fixable there, you might try fixing it and seeing if you can proceed further. If there is nothing fixable, then last model that was successfully estimated may be as close to your original plan as you can get. You can, of course, try skipping over the variable that broke the model to see if some of the remaining variables can also be added in without breaking the model.

            There is one other thing you might keep in mind while you are probing this problem. Your model includes 18 categorical variables. Each of these variables contains 2 or more categories. Even if each contains only 2 categories, you are, in effect dividing your data set into 218 = 262,144 subsets defined by combinations of those. (And if any of these variables has more than 2 categories, the number of subsets is proportionally greater stil.) Unless your data set is very, very large, you probably do not have enough information in your data to do this usefully, and this may be why Stata is having difficulty with the model. So it is possible that the variable that first breaks the model in the process I have suggested above does so not because of anything peculiar to that variable, but just because the data are insufficient to support that many variables.

            Added: By the way, it is not a good idea to address your question to a particular person. There are several Forum members who know a good deal more about many topics than I do. By naming me, you may discourage them from even reading your question and providing a better answer. These threads are not dialogs between two people: they are an open conversation in the Forum, and all members are invited to participate. Admittedly, where there is a long thread that has been a back-and-forth between original questioner and original respondent, it is unlikely that anybody else will suddenly join in. But this thread is not an example of that. And even in those cases, nothing is really gained by addressing a question to a particular person.
            Last edited by Clyde Schechter; 24 Aug 2018, 09:54.

            Comment


            • #7
              Originally posted by Muhammad Rashid View Post
              Dear Clyde
              I am having the sample problem with an xtlogit model in the imputed dataset. I have tried to run a simple model with only one variable but it doesn't run at all. my command is as follows

              mi xtset hosp2
              or: xtlogit pci i.lab i.hxami i.hxangina i.htn i.choles i.pvd i.cva i.asthama_copd i.crf i.hf i.smoking i.dm i.prevpci i.prevcabg i.bb c.age i.gender i.year i.ethnicity

              I am getting following error and the model doesn't run at all


              . mi estimate, or: xtlogit pci i.lab c.bmi i.hxami i.hxangina i.htn i.choles i.pvd i.cva i.asthama_copd i.crf i.hf i.smoking i.dm i.prevpci i.prevcabg c.age i.gender i.year i.ethnicity
              initial values not feasible an error occurred when mi estimate executed xtlogit on m=1
              As you must have noticed by now, everything is harder under multiple imputation. Every single thing.

              You aren't showing your full set of output, but I assume that when you typed something like (note: highly recommend you use the code delimiters for readability; see my signature for details and a link)

              Code:
              mi estimate, or: xtlogit pci i.lab
              
              initial values not feasible an error occurred when mi estimate executed xtlogit on m=1
              You still get the error message quoted.

              I suppose it could be just the first imputation that's somehow problematic. You can tell Stata to run a command on some specific imputations, e.g.

              Code:
              mi xeq 1 3 5 7: xtlogit pci i.lab c.bmi i.hxami i.hxangina i.htn i.choles i.pvd i.cva i.asthama_copd i.crf i.hf i.smoking i.dm i.prevpci i.prevcabg c.age i.gender i.year i.ethnicity
              would execute your original regression on imputations 1, 3, 5, and 7. It's probably no harm trying this, and you can see if it's just a few specific imputations that are problematic. It's probably worth it to run the plain logistic version of the command in each imputation also to see what, if anything, happens.

              I am not aware of an easy way to tell -mi estimate- to apply start values in each imputation. The likely start values would differ by imputation.
              Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

              When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

              Comment


              • #8
                Dear Weiwen

                Offcourse its hard with multiple imputations but the disappointing bit that I have managed to run the models for all of my outcomes barring one outcome for which the xtlogit model refuse to run. I am trying an alternative of meqrlogit model in mi estimate but this takes forever to run ( almost three times the xtlogit model). my dataset is very large with over half a million observations and clustering of over 300 hospitals.
                I will try your suggestion and let you know if this works but I think this won't give me a final answer either.
                Regarding the code delimiter, I am very new to this forum. I have Stata 14.1 but now sure how I can copy my output and code using dataex.. if you can tell me the syntax then it will be a great help.

                Regards

                Comment


                • #9
                  Originally posted by Clyde Schechter View Post
                  There are some problems that have no solution. I say this just to caution that, at the end of the day, this may be one of those.

                  That said, the first thing I would do here is see if the -xtlogit- command will run and reach convergence without the -mi estimate-. Try running -xtlogit- on just the unimputed data.

                  The next step is to simplify the model. I would start by ordering my predictor variables in order of importance from most important to my research goals down to least important to my research goals. I would then start trying the model with just the outcome and most important predictor. Most likely that will run without difficulty. Then I would continue to add back predictors, one at a time, in order of decreasing importance, and keep going until the estimation fails.

                  Once you have determined that some particular variable breaks your model, you might then look at the distribution of that variable, both marginal and conditional on each outcome to see if there is something pathological there or something to suggest errors in the data. If there is something fixable there, you might try fixing it and seeing if you can proceed further. If there is nothing fixable, then last model that was successfully estimated may be as close to your original plan as you can get. You can, of course, try skipping over the variable that broke the model to see if some of the remaining variables can also be added in without breaking the model.

                  There is one other thing you might keep in mind while you are probing this problem. Your model includes 18 categorical variables. Each of these variables contains 2 or more categories. Even if each contains only 2 categories, you are, in effect dividing your data set into 218 = 262,144 subsets defined by combinations of those. (And if any of these variables has more than 2 categories, the number of subsets is proportionally greater stil.) Unless your data set is very, very large, you probably do not have enough information in your data to do this usefully, and this may be why Stata is having difficulty with the model. So it is possible that the variable that first breaks the model in the process I have suggested above does so not because of anything peculiar to that variable, but just because the data are insufficient to support that many variables.

                  Added: By the way, it is not a good idea to address your question to a particular person. There are several Forum members who know a good deal more about many topics than I do. By naming me, you may discourage them from even reading your question and providing a better answer. These threads are not dialogs between two people: they are an open conversation in the Forum, and all members are invited to participate. Admittedly, where there is a long thread that has been a back-and-forth between original questioner and original respondent, it is unlikely that anybody else will suddenly join in. But this thread is not an example of that. And even in those cases, nothing is really gained by addressing a question to a particular person.

                  Thank you for the suggestions and some basic ethics of the forum. I will keep this in mind for next time.
                  just to clarify, my dataset is very large with over half a million observations. second, I have tried running the xtlogit model without any additional variable and it still breaks down with same error. Third, the most painful thing is that it run for almost 4 out of the 6 outcomes I am interested but not for the last two outcomes.
                  if there are other users on this forum who could shed some light on this, I will be eternally grateful

                  Cheers

                  Comment


                  • #10
                    Since you are doing random effects, you can also try estimating it with -melogit- and -meqrlogit-. They estimate the same model as -xtlogit, re- but use different algorithms to maximize the likelihood. One of them might work where -xtlogit-, re- fails.

                    Comment

                    Working...
                    X