Announcement

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

  • Difference between -cluster(id_var)- and -vce(cluster id_var)-

    Hello,
    can someone please explain me the difference if i have Panel Data ? They would look like
    Code:
    xtset country_id year
    Code:
    reghdfe y x1 x2, absorb(country_id) cluster(country_id)
    and

    Code:
    reghdfe y x1 x2, absorb(country_id) vce(cluster country_id)
    which one is correct ?

    Thanks in advance

  • #2
    Both are correct
    using cluster(var) is the older syntax
    vce(cluster var) is the newer one
    hth

    Comment


    • #3
      oh okay thanks. if i want to consider country fixed effects, what would my model look like ?

      Code:
      reghdfe y x1 x2, absorb(country_id) vce(cluster country_id)
      is this right ?
      Is it a problem that i absorb for country_id and also cluster ?



      Comment


      • #4
        Jannis:
        no, it is not.
        But you would get almost identical results with -xtreg,fe-.
        Last edited by Carlo Lazzaro; 03 Apr 2022, 11:53.
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment

        Working...
        X