Hi
I have a panel model that I estimated as follows:
areg N_ratio L1.N_ratio L1.M_ratio, abs(firm)
I have the explanatory variables for the next 12 quarters, to predict N_ratio for out of sample, here is what I did:
global end_date = 150
predict fe_x, d
bys firm: egen fe = max(fe_x)
mat beta=e(b)
svmat double beta
global b_N = beta1[1]
global b_M = beta2[1]
global b_con = beta3[1]
drop beta*
bys firm (date): N_ratio_predicted = $b_N*N_Ratio[_n-1] + $b_M*M_Ratio[_n-1] + $b_con + fe if date > $end_date
The problem is I get the forecast value of only ONE period ahead. That is apparently because of the autoregressive term. If I remove the AR term, I am able to generate the forecast....What am I doing wrong here and how to fix
Thanks
I have a panel model that I estimated as follows:
areg N_ratio L1.N_ratio L1.M_ratio, abs(firm)
I have the explanatory variables for the next 12 quarters, to predict N_ratio for out of sample, here is what I did:
global end_date = 150
predict fe_x, d
bys firm: egen fe = max(fe_x)
mat beta=e(b)
svmat double beta
global b_N = beta1[1]
global b_M = beta2[1]
global b_con = beta3[1]
drop beta*
bys firm (date): N_ratio_predicted = $b_N*N_Ratio[_n-1] + $b_M*M_Ratio[_n-1] + $b_con + fe if date > $end_date
The problem is I get the forecast value of only ONE period ahead. That is apparently because of the autoregressive term. If I remove the AR term, I am able to generate the forecast....What am I doing wrong here and how to fix
Thanks
Comment