You are on page 1of 1

set mem 100m

log using "E:/rule_1.log", replace


tsset period
gen inf_1 = L.inf
gen inf_2 = L2.inf
prog def rule_1
local j = -1
while `j'<= 50 {
local k = `j'+1
reg inf inf_1 inf_2 if (period <= `j')
predict infhat_`k' if (period ==`k')
local j =`j'+ 1
}
egen infhat = rsum(infhat_0 - infhat_51)
drop infhat_0 - infhat_51
end
rule_1
prog drop rule_1
log close
================================================
Solve[{a == -.2214*d*a - 0.082 + 0.164*d*a + a^2,
b == -0.2214*d*b + 0.164*d*b + a*b,
c == -0.2214*d*c + 0.164*d*c + a*c + 1,
d == 0.3*(-0.22142*d*a - 0.082*d*a + a^2) + .99*d*a,
e == 0.3 (-0.2214 *d*b + 0.164*d*b + a*b) + .99*d*b + 1,
f == 0.3 (-0.022148 d*c + 0.164*d*c + a*c + 1) + 0.99*d*c,
g == 4*d*a,
h == 4*d*b,
i == 4*d*c},
{a, b, c, d, e, f, g, h, i}]

You might also like