Announcement

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

  • Multi level analysis

    Dear all, I hope you are fine.
    I am doing my reserach about depressive symptoms which has two out come (normal and depressed ) and there are almost 14 independent varible such as education , age , sex, smoking status , occuption......

    My sample size is 29,921

    I want to do multi level analysis using ethnicity as second level


    The ethnicity varible has 23 catogeries and I want to use it as second level , however when I try to do the command,
    I got ( initial values not feasible)

    I already make sure that each catogery of ethnicity does not have less than 30 observation

    this is my command

    melogit total_depression_two_cat sex working_status_cat PCA_two_cat age_4_adoles_adul_elderly MS_cat Healthy_cat education_2_cat SW_cat health_utilzation bmi_cat_4 smoking || ethnicity_multi_level :


    May you explain to me why I am not able to do it

    Thank you very much

  • #2
    "Initial values not feasible" is one of the more frustrating things that can go wrong in estimating models. It means that Stata could not find any starting values for its estimation of the coefficients that were suitable for its maximizing algorithms to work with. The same model might work on a different data set. And it isn't always possible to identify what specifically is causing the problem. Potential issues are continuous variables on greatly different scales (not in your case as it seems all but one of your variables is categorical), or, more likely in a model with a large number of categorical variables, too many combinations of the different variables do not exist anywhere in the data set.

    But often, no particular cause of the problem is identifiable. The usual solution is to simplify the model. First estimate the model with no explanatory variables. Then add the explanatory variables back in one at a time, stopping at the point where you no longer get a successful estimation. You might then scrutinize the variable that first produces the problem to see if there is something wrong with the data in it. If you find a data problem fix it. If not, then you just have to resign yourself to the idea that that variable cannot be used, at least not without some other change to the model. It's a trial and error process of building up the best model that you can still get estimates for one step at a time.

    But I want to challenge the approach you are using. It is certainly unusual to use ethnicity as a level for a random effect in a model. Do you really think it is reasonable to think of the ethnicities in your model as a random sample from some universe of ethnicities? And is it reasonable to think that those ethnicity effects would have a normal distribution? It would surprise me if the answer to either of those questions is yes. If, in fact, they are, then go ahead and try to fix up the model in the ways I described above. But if not, I would think it more natural to just include i.ethnicity_multi_level as another fixed effect. At that point you are no longer doing multi-level modeling, and -logit- estimation is less trouble-prone than -melogit-.

    Comment

    Working...
    X