Announcement

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

  • Error r(1400) "initial values not feasible" when running meologit

    Hi. I'm using Stata/SE 18.0 and has encountered a r(1400) error while running multilevel ordinal logistic regression with 2 levels. The data contains 30 predictor variables and about 29K obs.
    The code is as follows:




    meologit h_ousingsatisfaction a_age a_gender a_married a_children a_familysize a_beneficiaries a_education a_monthlyincome a_debt b_housemanageexpense b_houseprice b_constructionyear b_dwellingarea b_interiorquality b_indoorenvironmentlevel b_indoorsafetyclean c_neighborhoodrelation_mean c_schooldistrict_mean c_safetyaroundhouse_mean c_pedestriansafety_mean c_noisearoundhouse_mean c_cleannessaroundhouse_mean c_airpollutionaroundhouse_mean c_accesstonatural_mean c_accesstocommercial_mean c_accesstomedical_mean c_accesstopublic_mean c_accesstocultural_mean c_accesstotransportation_mean c_accesstoparking_mean || city_id: a_age a_gender a_married a_children a_familysize a_beneficiaries a_education a_monthlyincome a_debt b_housemanageexpense b_houseprice b_constructionyear b_dwellingarea b_interiorquality b_indoorenvironmentlevel b_indoorsafetyclean, cov(uns)

    Fitting fixed-effects model:

    Iteration 0: Log likelihood = -23005.961
    Iteration 1: Log likelihood = -18039.269
    Iteration 2: Log likelihood = -16071.316
    Iteration 3: Log likelihood = -15925.584
    Iteration 4: Log likelihood = -15923.856
    Iteration 5: Log likelihood = -15923.854
    Iteration 6: Log likelihood = -15923.854

    Refining starting values:

    Grid node 0: Log likelihood = 0

    Fitting full model:

    initial values not feasible
    r(1400);




    As could be seen, I was running the contextual model with both level 1 and 2 variables, but the same error also occurred in the random coefficient model.
    Last edited by Jihwan Lee; 07 Jul 2023, 09:55.

  • #2
    This is an enormously complicated model. Not only do you have 30 variables at the bottom level of the model, 15 random slopes, and you have 120 covariance parameters to estimate at the city_id: level.

    Do you really need unstructured covariance estimates? How will you even present these covariance estimates when you present your work? I suspect you won't. So get rid of the unstructured covariance for a start. Also eliminate some of the random slopes. Again, which of these variables to you really believe has a cross-level interaction? If you really believe they all do, for which ones would that interaction be small? Also give consideration to eliminating some of the 30 bottom-level variables. Are they really all necessary?

    So strip the model down to the most essential elements: the most critical bottom-level explanatory variables, the random slopes that are truly essential for an adequate analysis of your research question, and just use independent covariance structure. If you get that minimal model to run, then you can start adding back some of the things you wanted, just one or a few at a time, in order of importance to your research questions. But at some point you will again exceed the complexity of what can be handled and you will have to settle for less than you originally wanted.

    Another factor to consider in selecting which variables to retain in your minimum model is the predictive power of each explanatory variable. Try looking at simple bivariate relationships between your outcome and each explanatory variable. If you have an explanatory variable which has an extremely strong effect on the outcome, then the coefficient of that variable in the model will be "almost infinite" and will be very hard to estimate. Leave out such variables from the model.

    Another issue that sometimes matters is the scale of the explanatory variables. For the continuous variable, changing the units of measurement so that the range of numeric values of the variables is reasonably narrow and is similar among all the continuous variables can improve the situation. For example, house price and dwelling area would, in their natural units, be order of magnitude 106 or even 107 and order of 103, respectively. The model would be easier to work with if the ranges of these numbers were more similar. That could be accomplished by, for example, denominating the price in thousands of dollars instead of dollars. Then it would be order of 102 or 103.
    Last edited by Clyde Schechter; 07 Jul 2023, 11:52.

    Comment

    Working...
    X