Announcement

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

  • #16
    Dear Joro
    Thanks for your demonstration. Through my post#7 I tried to ask that (which I couldn't express well). Since I don't have any expertise in theory I did some empirical analysis and found that following codes below gives same results
    Code:
    use "http://www.stata-press.com/data/r14/nlswork.dta", clear
    egen double_cluster=group(idcode year)
    regress ln_wage hours age i.race, vce(cluster double_cluster) // way 1
    regress ln_wage hours age i.race, vce(robust) // way 2
    reghdfe ln_wage hours age i.race, noabsorb cluster(idcode#year) // way 3
    Incidentally, I looked at at the line (Std. Err. adjusted for 28443 clusters in double_cluster), where 28443 is = Number of obs (28443). Then I realized all the three ways will give not the results for double clustered data but robust standard errors(though I was unsure whether I am right or not . Hong Il Yoo, through his explanation, enabled me to understand this.


    Sorry I missed https://www.statalist.org/forums/for...26#post1567426.
    That was Incredible. Now I guess I can understand the theory behind the robust standard errors by following your demonstration. Joro, No words to thank you for this.
    Last edited by lal mohan kumar; 07 Aug 2020, 05:53.

    Comment


    • #17
      You can use ivreg2 to do that.

      ivreg2 y x, cluster(id year)

      Comment

      Working...
      X