Announcement

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

  • Dual clustering for xtlogit

    Dear all,
    I am trying to run an xtlogit random effects model on panel data (89 countries, 45 years) with errors dually clustered on id and year. I have tried using vcemway, in the model
    vcemway logit crisisbanking creditbonanzal1 meancreditbonanza var55 var57 var70, cluster(id year)
    however it returns the error message "option cluster() not allowed". I have also tried generating a double cluster variable (egen dbl_clstr = group(id year)) and running
    xtlogit crisisbanking creditbonanzal1 meancreditbonanza var55 var57 var70, vce(dbl_clst)
    however this also doesn't work, returning the error message "panels are not nested within clusters".

    How can I dually cluster my errors sucessfully?

    For reference, my model is vcemway logit crisisbanking creditbonanzal1 meancreditbonanza var55 var57 var70, cluster(id year)
    My data looks
    id year creditbonanzal1 meancreditbonanza var55 var57 var70
    Thanks in advance,
    Chris

  • #2
    Forgot to include the (dependent) crisis dummy variable in the data table and to mention that creditbonanzal1 is also a dummy, with meancreditbonanza its country mean.

    Comment

    Working...
    X