I have a diff-in-diff panel design with individual-level outcomes Yigt and group-level treatment TREATgt. Treatment was rolled out to different age-groups g in different years t.
I want to account for intra-group correlation by clustering on g. However, treatment was assigned by only 4 age-groups. Clustering by this few groups will lead to over-rejection. Clustering by g*t will be biased by serial correlation.
I want to block-bootstrap along the lines of Cameron, Gelbach & Miller (2008). Would anyone be able to double-check this is the correct way of coding a block-bootstrap for diff-in-diff?
I want to account for intra-group correlation by clustering on g. However, treatment was assigned by only 4 age-groups. Clustering by this few groups will lead to over-rejection. Clustering by g*t will be biased by serial correlation.
I want to block-bootstrap along the lines of Cameron, Gelbach & Miller (2008). Would anyone be able to double-check this is the correct way of coding a block-bootstrap for diff-in-diff?
Code:
xtset id year bootstrap, reps(100) seed(1): xtreg y i.age##i.year treat covars vce(cluster age)