Announcement

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

  • how to run a 3 level multilevel model ?

    hello
    I wish to make a multi-level analysis with data classified at three levels, namely
    student class region
    in the empty model should I specify the three variables that allow me to distinguish each level of analysis?

    When I do so, the model does not run

    my commande mixed
    Click image for larger version

Name:	Capture 5.PNG
Views:	1
Size:	59.6 KB
ID:	1587673
    Scoremoyengeneral || ID_STRATE :|| ID_ECOLE :|| ID_ELEVE :
    Thank

  • #2
    How many observations do you have per student? How many regions to you have?

    If you have many observations per student, and only a relative few regions, then maybe start with
    Code:
    mixed Scoremoyengeneral i.ID_STRATE || ID_ECOLE: || ID_ELEVE:
    and then go from that.

    Comment


    • #3
      Romuald:
      as a general rule, whenever Stata warns about convergence issues concerning an MLE-supported statistical analysis, it is wise to start it all over again from a more parsimonius model, adding predictors/level one at time and see where Stata starts to gasp.
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Originally posted by Joseph Coveney View Post
        How many observations do you have per student? How many regions to you have?

        If you have many observations per student, and only a relative few regions, then maybe start with
        Code:
        mixed Scoremoyengeneral i.ID_STRATE || ID_ECOLE: || ID_ELEVE:
        and then go from that.
        I have 3817 students
        6 regions
        266 schools

        I tried the code you proposed
        but it goes on forever
        here is a screenshot

        Click image for larger version

Name:	Capture 8.PNG
Views:	1
Size:	40.4 KB
ID:	1587691

        Comment


        • #5
          Originally posted by Romuald Landry View Post
          I have 3817 students
          6 regions
          266 schools

          I tried the code you proposed
          but it goes on forever
          My question was: how many observations do you have per student?

          I noticed that you don't have any time variable in your model, which I would expect unless you have only one observation per student. And if you have only one observation per student, then it will go on forever. In that case, try
          Code:
          mixed Scoremoyengeneral i.ID_STRATE || ID_ECOLE:
          (Although it might be feasible to treat region as random, six regions is somewhat few.)

          Comment


          • #6
            indeed I have only one observation per student
            data were collected over a single year (so no time variable)
            the command you suggested works

            How can we currently get the percentage of variation at the school, class and regional level?
            Since it is in the empty model that I have to obtain these variations?

            I find that school explains 63% of the variations in academic performance,
            I couldn't find the percentage explained by the class and the students.
            Click image for larger version

Name:	Capture 9.PNG
Views:	1
Size:	34.7 KB
ID:	1587776

            Comment

            Working...
            X