Announcement

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

  • multilevel model with vce(cluster)

    Hello,

    I have a dataset with kids nested within schools, and the outcome was measured four times over 2 years (4 waves).
    So, waves - kids - schools (3-level).

    I tested ICC at the school level, and it is very low (~.001). So I am considering only 2-levels (kids-schools).

    And there are three intervention groups, and we want to see if there are any differences in rates of change across those intervention groups.

    Here is the code.
    y=outcome
    grp=3 intervention groups
    wave=4 waves (intervals are the same)
    ID=individual id
    schoolID=school id

    Code:
    mixed y i.grp c.wave || ID: c.wave
    Still, I want to make it sure that the clustering at the school level is considered. So I used vce(cluster schoolID) options.

    Code:
    mixed y i.grp c.wave || ID: c.wave, vce(cluster schoolID)


    Question 1) Is this making sense?
    Question 2) what is the major difference between
    vce(cluster schoolID) and vce(robust)?

    I would appreciate any comments!
    Thanks.






  • #2
    -vce(cluster schoolID)- will adjust the standard errors so that they are robust to heteroscedasticity as well as autocorrelation within schools. -vce(robust)- does not deal with autocorrelation issues.

    The model you show is syntactically fine and is a reasonable model, but it does not answer the question you say you are interested in. That model will contrast the three groups on the expected value of y. If you want to contrast the three groups on the rates of change then you need:

    Code:
    mixed y i.grp##c.wave || ID: c.wave // SPECIFY -vce()- AS DESIRED
    margins grp, dydx(wave)

    Comment


    • #3
      Thank you so much! I will use vce (cluster schoolID ) option which deals with my concern. Yes, I am testing the interaction as you instructed to answer the main question

      Comment

      Working...
      X