Announcement

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

  • Accounting for multiple levels of clustering using xtgee?

    Hello Statalist!

    This is my first post but I've used Statalist with much success to help solve previous issues.

    I am using difference in difference analysis to analyze results from a controlled before and after trial. My observations have two levels of non-independence/clustering. First, I have "before and after" (read: repeated) measures on individuals. Second, individuals are clustered by community. I would like to use GEE with family(poisson) and link(log) and robust standard errors to obtain risk ratios. However, I am having some trouble accounting for multiple layers of clustering using GEE.

    My first though was to use the participant identifier (participantid) as the panel variable and then use vce(cluster clustervar) to account for clustering by community. However, when I ran the following code, I received the below error:

    xtset participiantID
    xtgee outcome phase studyarm phase*studyarm, family(poisson) link(log) vce(cluster communityID) robust eform
    options vce() and robust may not be combined
    r(198);

    So, I have a couple of questions and a request:
    1. Is the "robust" at the end of the code redundant since I'm including vce(cluster communityID)? If not, does anyone know a work-around?
    2. If anyone has experience running multi-level GEE in Stata and has a better approach, I would be very happy to discuss and try it!

    Thanks in advance for any help you can provide.

  • #2
    Hello Statalist,

    I've seen a few posts that inquire about accounting for multiple levels of clustering using xtgee and have gone unanswered. As I'm encountering similar questions, I'm hoping to revive the discussion here.

    In my dataset, I have repeated measures (clustering within the individual) and individuals are also clustered within schools. I'm interested in the population average rather than a subject-specific inference, and am treating the clustering as more or less a 'nuisance' (e.g., my RQ is not interested in whether going to School A and taking a program gives a different effect than going to School B and taking the program). However, I acknowledge that it's important to account for the clustering so I don't over/underestimate treatment effects.

    From my understanding, this is an appropriate scenario for a GEE model, however there doesn't seem to be clear guidance on how to incorporate multiple levels of clusters in a GEE model in Stata. After a lot of digging, I've come across a workshop handout (https://archimede.mat.ulaval.ca/page...e/handouts.pdf) which suggests that when using GEE to model multilevel data you simply "Fit single-level model but adjust standard errors for clustering (GEE approach)" (see slide 25). However, as per above, vce(cluster clustervar) is not an option for xtgee.

    I know GEE model estimates are said to be robust to the misspecification of the correlation structure as long robust SEs are used, but I'm wondering if simply modelling my level-1 clustering (repeated measures) and essentially ignoring my level 2 clustering (schools) and using robust SEs is indeed the appropriate way to handle multiple levels of clustering using xtgee? If not, can someone point me to some resources that provide guidance on the appropriate way to build syntax that accounts for multiple levels of clustering in a GEE model?

    Thanks in advance,
    Jessica

    Comment


    • #3
      Hi all,

      Hoping to revive this thread. I also would like to account for repeated measures (pre-post data for the same individual) and clustering by a relationship dyad in the same model. I similarly am not finding information about incorporating multiple levels of clustering into a GEE model using STATA.

      I would greatly appreciate any advice on this!

      Thanks,
      Grace

      Comment

      Working...
      X