Hello,
I am doing a subsample analysis for the effect of X on Y, based on whether observations fall in a particular Subsample (defined by dummy variable S). I am clustering the standard errors by group (variable gr). These are the models I am running:
Subsample a: reg Y X if S==0, cluster(gr)
Subample b: reg Y X if S==1, cluster(gr)
Because I want to test for the difference of the effect of X on Y across the subgroups, I am running the fully-interacted model, aiming to replicate the estimates from Subsamples 1 and 2:
Fully interacted model: reg Y c.X#i.S c._cons#i.S, nocons cluster(gr), where _cons=1.
While this approach replicates my coefficient estimates, it does not replicate my standard errors. I think the problem is with how standard errors are clustered. I tried an alternative approach, by creating double clusters manually at the group&subsample level, but it still did not replicate my s.e. across subsamples:
egen double_clus_group=group(gr S)
reg Y c.X#i.S c._cons#i.S, nocons cluster(double_clus_group)
Any help is appreciated.
I am doing a subsample analysis for the effect of X on Y, based on whether observations fall in a particular Subsample (defined by dummy variable S). I am clustering the standard errors by group (variable gr). These are the models I am running:
Subsample a: reg Y X if S==0, cluster(gr)
Subample b: reg Y X if S==1, cluster(gr)
Because I want to test for the difference of the effect of X on Y across the subgroups, I am running the fully-interacted model, aiming to replicate the estimates from Subsamples 1 and 2:
Fully interacted model: reg Y c.X#i.S c._cons#i.S, nocons cluster(gr), where _cons=1.
While this approach replicates my coefficient estimates, it does not replicate my standard errors. I think the problem is with how standard errors are clustered. I tried an alternative approach, by creating double clusters manually at the group&subsample level, but it still did not replicate my s.e. across subsamples:
egen double_clus_group=group(gr S)
reg Y c.X#i.S c._cons#i.S, nocons cluster(double_clus_group)
Any help is appreciated.
Comment