Dear All, I modify a code to test the significance of product of two coefficients from two panel data models. The code is
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
  1. Just for illustration, the first one is a fixed effect model, while the second one is a random effect model.
  2. 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.
Any suggestions or comments are highly appreciated.