Code:
webuse grunfeld, clear xtset, clear capture program drop xt_prod program define xt_prod, rclass xtset company xtreg invest mvalue, fe robust local a = _b[mvalue] xtreg invest kstock, re robust local b = _b[kstock] return scalar prod = `a'*`b' exit end bootstrap prod = r(prod), reps(100) cluster(company) idcluster(ID): xt_prod
- Just for illustration, the first one is a fixed effect model, while the second one is a random effect model.
- The end is to test whether the product of the coefficient of mvalue in the first model and that of kstock in the second model is statistically significant.
0 Response to bootstrap for panel data
Post a Comment