Hi Statlist,
I would like to compute the variance of forecast errors in a panel data setting as indicated in manuscript (trascinato).pdf. In particular, I have build up what is called formula 2 in the manuscript as:
Now the tricky parts: first, forecast errors. To compute them I have simply made:
I have noticed that in "regress" command there is something like star that can be used after predict to compute standard errors of residuals. This is not the case with "xtreg", so I am wondering how I can compute the variance for each single error to obtain what is called Var(AV_it_hat) in the numerator of (4) in manuscript (trascinato).pdf (and then collapse by (time) in order to obtain (4)).
Thank you very much,
Federico
I would like to compute the variance of forecast errors in a panel data setting as indicated in manuscript (trascinato).pdf. In particular, I have build up what is called formula 2 in the manuscript as:
Code:
xtreg tasso_crescita_sales_prod L.log_sales L.dummy_2 L2.dummy_2 L3.dummy_2 mean_gr_rate_atc2 recalls_sales ageprodcat1 ageprodcat2 ageprodcat3 ageprodcat4 newmolfirm newmolmarket i.Year, fe vce(cluster idpr)
Code:
predict yhat, xbu gen forecast_errors = tasso_crescita_sales - yhat
Thank you very much,
Federico
Comment