Dear Statalisters,
I am working with an unbalanced panel data (385 observations, T=21, N=21). I am trying to estimate a fixed effects IV regression:
var1, var2, var4, var5 are exogenous independent variables, var3 is endogenous and I instrument it using z. var2_var3 = var2*var3 and is instrumented using var3_z = var2*z. (-xtivreg2 is not allowing me to use -fvarlist- so I am constructing interactions manually).
Given that I have interaction terms in my specification, the coefficient for main effects, e.g. for var2 alone, is interpreted as the marginal impact of var1 conditional on var3=0. However, var3=0 is not a sensible value in my context. Is there a way for me to calculate the marginal impact of var1 if, say var3 is equal to its median or mean value instead? I was exploring the possibility of estimating the above xtivreg2 command on data that is centred on means (according to https://www3.nd.edu/~rwilliam/stats2/l53.pdf).
But I am not sure if this is correct. (1) should I demean ALL the variables or only those which are interacted (var2 and var3)? (2) Is there a more straightforward way to interpret standalone main effects in such a model?
Many thanks,
Mihir
I am working with an unbalanced panel data (385 observations, T=21, N=21). I am trying to estimate a fixed effects IV regression:
Code:
xi: xtivreg2 y var1 var2 var4 var5 i.year (var3 var2_var3 = z var2_z), fe gmm cluster(id) partial(i.year)
Given that I have interaction terms in my specification, the coefficient for main effects, e.g. for var2 alone, is interpreted as the marginal impact of var1 conditional on var3=0. However, var3=0 is not a sensible value in my context. Is there a way for me to calculate the marginal impact of var1 if, say var3 is equal to its median or mean value instead? I was exploring the possibility of estimating the above xtivreg2 command on data that is centred on means (according to https://www3.nd.edu/~rwilliam/stats2/l53.pdf).
Code:
foreach v of var var1 var2 var3 var3 var5 z { sum `v', meanonly gen c`v' = `v' - r(mean) } xi: xtivreg2 y cvar1 cvar2 cvar4 cvar5 i.year (cvar3 cvar2_cvar3 = cz cvar2_cz), fe gmm cluster(id) partial(i.year)
Many thanks,
Mihir
Comment