Announcement

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

  • ANOVA test for clustering

    Hi, I want to check whether there is a need to cluster my results.

    I am doing a panel regression regressing recycling rates on income, household size, population density and method of recycling dummies over 20 quarters for 310 local authorities in England.

    Am I correct to use the ANOVA 'loneway' command to check if I should be clustering my standard errors? Where acode is the code for each local authority?

    loneway recycling acode

    Do I understand correctly that this tells me the % of of the variation in recycling rates comes from between local authorities?
    And if this is high there is a high correlation of recycling rates due to local authority specific changes?

    Thank You

  • #2
    I recommend letting the study design, and not a test, govern whether a regression model includes clustering on local authority.

    Nevetheless, Stata's mixed estimation command includes such a test by default. So, you could
    Code:
    mixed recycling c.(income household_size population_density) i.(recycling_method quarter season) || acode:
    and inspect the likelihood-ratio test result at the bottom of the regression table.

    You can inspect the variance components displayed in the output to judge the relative contribution of the two sources to overall variation. You can supplement that with the postestimation command, estat icc.

    Depending upon the nature of the measure of recycling rate, you might want to look into the analogous command for generalized linear models, meglm, or if you want to further exploit the longitudinal nature of the data, then xtgee.

    Comment


    • #3
      Joseph, thank you for your response. I am still a little confused, I ran this code and got the results below. Why is the 'loneway' test not useful?

      LR test vs. linear model: chibar2(01) = 5651.86 Prob >= chibar2 = 0.0000

      What does this result mean? What is the meaning of the word 'mixed', why have I got a mixed effects model?

      I also ran estat icc to get the intraclass correlation and got these results which I am unsure how to interpret?
      acode | .6745572 .0187628 .6367661 .7102058
      ------------------------------------------------------------

      Finally what is the purpose of meglm?

      Comment


      • #4
        Originally posted by Darcy Hill View Post
        Why is the 'loneway' test not useful?
        It's probably useful, but probably not as useful as a technique that takes into account the other covariates.

        What does this result mean?
        That you would do well to include local authority as a random effect.

        What is the meaning of the word 'mixed', why have I got a mixed effects model?
        Your fourth question answered your third. The answer to your fourth question is given above, in the answer to your second.

        I also ran estat icc to get the intraclass correlation and got these results which I am unsure how to interpret?
        Variance between local authorities accounts for about two-thirds of the total.

        Finally what is the purpose of meglm?
        It allows flexibility in modeling.

        Comment


        • #5
          Dear Joseph, thank you very much for your response.

          What does this mean? "That you would do well to include local authority as a random effect." I am running a fixed effects model why would I include a fixed effect? Below is my regression.

          xtreg compost loginc logpopden loghhsize md11 md12 md13 md14 md15 md16 md17 md18 md19 md31 md32 md33 md34 md35 md36 md37 wasteavg comavg quarter2 quarter3 quarter4, fe vce(cluster acode)


          I also don't understand where the answer to the question about the word 'mixed', the path is too cryptic for me?

          Comment


          • #6
            Okay, so your original question was something like:

            Below is my tentative regression command.
            Code:
            xtset acode
            xtreg compost loginc logpopden loghhsize md1? md31 md32 md33 md34 md35 md36 md37 ///
                wasteavg comavg quarter2 quarter3 quarter4, fe
            I would like to perform a test in order to determine whether I should append
            Code:
            vce(cluster acode)
            to the command above. Would a one-way ANOVA using
            Code:
            loneway recycling acode
            be a suitable test for this?

            Did I get that right?

            Comment


            • #7
              yes!

              Comment

              Working...
              X