Announcement

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

  • Multilevel linear models in Stata

    Hi everyone. I am trying to understand how students background as of migration background, their parent socioeconomic information and place of living affect their final grade. I don't have information about school condition ( i.e number of class, language and etc) and I roughly know in which school each student is attending. So shall I use HLM or OLS in this case in enough?

  • #2
    Samaneh:
    due to the scant handful of details you share about your reasearch project, I would say:
    - if you can track down the way pupils are nested within classes, you can try -mixed-;
    - otherwise, -regress- is probably the way to go.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Carlo already clarified the issue. That said, for a mixed model, you’d need to have data displayed accordingly, I mean, individuals would need to be nested within, say, places, but then again that would depend not only on the available data, but also on the study question and what one is going to make of the variance within as well as between.
      Best regards,

      Marcos

      Comment


      • #4
        Thanks for replying. Indeed I would like to know whether there is a gap between migrants and native students in their final grading. But since beside migration background, other covariates as of school location, place of living, family condition affect students output, I want to examine the effect of all these covariates. But all I have in my data is students' personal and family background and the location of the school (codes) that students go and NO information about the class and school condition. So can I simply regress effect of these covariate son student final output? Do you have any suggestion?

        Comment


        • #5
          Samaneh:
          Marcos pointed out the relevant issue that your approach should be consistent with your research goal and, I would add,with the usual research strategies in your research field.
          That said, OLS maight be the way to go.
          As as aside, please note that more positive replies are conditional on posting an example/excerpt of your dataset via -dataex-.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            I fully agree with Carlo: it seems the structure of the data wouldn’t allow for a mixed model estimate; also, with no data display, guesswork prevails.
            Best regards,

            Marcos

            Comment


            • #7
              Thanks for your all responses. I have not full access to the dataset so here I have provided a sample of data. in case you can add more to your suggestion.
              id age Migrant back family income parental education Number of children in family school id school Location(CITY)
              1 12 Migrant 1500 high educated 2 1 A
              2 11 Migrant 1500 not educated 3 1 A
              3 15 Native 2000 high educated 1 1 A
              4 13 Native 1200 high educated 2 1 A
              5 17 Migrant 1500 not educated 4 1 A
              6 13 Native 2500 high educated 2 1 A
              7 14 Native 2300 not educated 3 1 A
              8 12 Migrant 2000 high educated 4 2 B
              9 13 Native 1700 not educated 3 2 B
              10 11 Native 2000 not educated 2 2 B
              11 14 Native 2300 high educated 3 2 B
              12 17 Migrant 1800 high educated 4 2 B
              13 14 Migrant 1600 not educated 3 2 B
              14 12 Migrant 1900 not educated 4 2 B
              15 15 Native 1900 high educated 4 2 B

              So by having school location and Id can I say since students are nested to specific schools and schools are nested in a specific city then I can use mixed model?
              Last edited by samaneh khaef; 01 Jun 2018, 04:26.

              Comment


              • #8
                Yes.
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment


                • #9
                  Just an additional note: after taking a look at the data display, it seems the variables school and location convey the same thing.
                  Best regards,

                  Marcos

                  Comment


                  • #10
                    Thanks for your attention Marcos. In reality, it is NOT. Apparently, there is a mistake and I will re-upload it.

                    id age Migrant back family income parental eductaion no childeren school id school Location(CITY)
                    1 12 Migrant 1500 high educated 2 1 A
                    2 11 Migrant 1500 not educated 3 1 A
                    3 15 Native 2000 high educated 1 1 A
                    4 13 Native 1200 high educated 2 1 A
                    5 17 Migrant 1500 not educated 4 1 A
                    6 13 Native 2500 high educated 2 1 A
                    7 14 Native 2300 not educated 3 1 A
                    8 12 Migrant 2000 high educated 4 2 B
                    9 13 Native 1700 not educated 3 2 B
                    10 11 Native 2000 not educated 2 2 B
                    11 14 Native 2300 high educated 3 2 B
                    12 17 Migrant 1800 high educated 4 2 B
                    13 14 Migrant 1600 not educated 3 2 B
                    14 12 Migrant 1900 not educated 4 2 B
                    15 15 Native 1900 high educated 4 2 B
                    16 13 Native 2500 high educated 2 3 B
                    17 11 Migrant 2000 high educated 1 3 B
                    18 12 Migrant 1200 not educated 2 3 B
                    19 12 Migrant 1300 not educated 2 3 B
                    20 15 Native 1500 not educated 3 3 B

                    Comment


                    • #11
                      Ok, this larger display of observations in #10 is clearer. It seems - schools - are nested within location, which is somewhat logical. That said, it also seems you may have just one school nested in a given school location, and this, if frequent, may cause problems to the (purpose of the) hierarchical nature of the data. Since you said you have not access to the full data so far, this is the furtherst I can go in terms of hazarding a guess. Anyway, if the data won't provide the necessary structure for a hierarchical model, I gather you may go with linear multiple regression, maybe with - school - as a cluster variable. All in all, I wish you good luck with the research.
                      Best regards,

                      Marcos

                      Comment

                      Working...
                      X