Hello statalists,
I am trying to compute a tsset variable with observations equal to the cumulative summation of coefficients up to `i', i.e. φ0 for h = 0, φ0 + φ1 for h = 1, φ0 + φ1 + φ2 for h = 2, and so on.
h=_n
forvalues i=0/8 {
qui reg F`i'.GDP_growth L(0/2).MPshock_CGK if t>=tq(1965q3) & t<=tq(2008Q4), r
qui g GDP_response= _b[MPshock_CGK] if h==`i'
}
The above codes gives me the φi, unfortunately I don't know how to sum them up to `i', i.e. I need GDP_response be a time series as:
t0 φ0
t1 φ0 + φ1
t2 φ0 + φ1 + φ2
t3 φ0 + φ1 + φ2 + φ3
t4 φ0 + φ1 + φ2 + φ3 + φ4
Bests,
G
I am trying to compute a tsset variable with observations equal to the cumulative summation of coefficients up to `i', i.e. φ0 for h = 0, φ0 + φ1 for h = 1, φ0 + φ1 + φ2 for h = 2, and so on.
h=_n
forvalues i=0/8 {
qui reg F`i'.GDP_growth L(0/2).MPshock_CGK if t>=tq(1965q3) & t<=tq(2008Q4), r
qui g GDP_response= _b[MPshock_CGK] if h==`i'
}
The above codes gives me the φi, unfortunately I don't know how to sum them up to `i', i.e. I need GDP_response be a time series as:
t0 φ0
t1 φ0 + φ1
t2 φ0 + φ1 + φ2
t3 φ0 + φ1 + φ2 + φ3
t4 φ0 + φ1 + φ2 + φ3 + φ4
Bests,
G
Comment