Announcement

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

  • Estimating Random Effects in Mixed-effect Logistic Regression Model

    Hello,

    I am facing a crucial problem during the estimation of a random effect in a mixed effect logistic regression from a repeated-cross sectional dataset. In the 2 picture, I have attached here, "Cluster Identity" and "Year of Interview" is taken as random effects (The box marked section). But I am too much confused about what will be the STATA command of this regression since there are 2 random effects at a time here. I have already tried with these two types of command but the STAT is saying "factors variables are not allowed in the random-effects equation" because of putting 'year of interview" variable as a random effect. But then how do this paper estimated the random effect of the year of interview and what can be the correct command?

    The commands I have tried till now are:

    1. (using cluster before year in the random effects' section of the command)
    melogit stunted log_PCI i.Child_Age Child_Sex i.Woman_Age i.Region Residence Drinking_Water Mother_Height Work_of_Mother Work_of_Partner i.Household_Members Under5_Child i.Partner_Edu || Cluster_Identity: || Year_of_int: , or

    2. (using year before cluster in the random effects' section of the command)
    melogit stunted log_PCI i.Child_Age Child_Sex i.Woman_Age i.Region Residence Drinking_Water Mother_Height Work_of_Mother Work_of_Partner i.Household_Members Under5_Child i.Partner_Edu || Year_of_int: || Cluster_Identity: , or

    But in the case of both commands, the STAT is saying "factors variables are not allowed in the random-effects equation" because of using putting 'year of interview" variable as a random effect. Now, what should I do? What is the correct command to estimate the random-effects of both of year of interview and cluster like the picture of the research paper I have attached here? Or, is there any fault in my commands? If so, then what is that fault? Please, help me. Thanks a lot in advance.
    Click image for larger version

Name:	page1.png
Views:	2
Size:	74.9 KB
ID:	1578727
    Click image for larger version

Name:	page 2.png
Views:	2
Size:	67.5 KB
ID:	1578728

  • #2
    Originally posted by Zahid Hasan View Post
    . . . the STAT is saying "factors variables are not allowed in the random-effects equation" because of putting 'year of interview" variable as a random effect.
    I don't understand how you could have got that error message from that command syntax. Are you sure that that is what you typed and that is what you got?

    Did Jeff Wooldridge publish that table? Maybe you'll want to ask him about the syntax he used.

    Oh, and you might have to wait a bit for your post to appear, but you don't need to post the same thing twice.

    Comment


    • #3
      Originally posted by Joseph Coveney View Post
      I don't understand how you could have got that error message from that command syntax. Are you sure that that is what you typed and that is what you got?

      Did Jeff Wooldridge publish that table? Maybe you'll want to ask him about the syntax he used.

      Oh, and you might have to wait a bit for your post to appear, but you don't need to post the same thing twice.
      Actually, I didn't get that error message. I did a mistake at the time of writing this post. That's why I posted the second one rightly and wanted to delete the first post with the error message. But here I found no delete option available. So I couldn't delete it. And regarding tagging Jeff Wooldridge, I thought this platform works like Quora where people can tag any specialist in the area so that they can reach them quickly to have the solution. Since he is an expert, I tried to tag him with the expectation that he might also help me solving this problem.

      Comment

      Working...
      X