Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Forecast errors

    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:

    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)
    Now the tricky parts: first, forecast errors. To compute them I have simply made:

    Code:
    predict yhat, xbu
    gen forecast_errors = tasso_crescita_sales - yhat
    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

  • #2
    You didn't get a quick answer. You'll increase your chances of a useful answer by following the FAQ on asking questions. In particular, please provide full references for any papers and use the simplest model that demonstrates the problem. It is better if instead of citing a paper, you explain what you need to calculate.

    Often, when Stata doesn't do something, there is a good reason. That said, it is also true that there are many things in the literature that Stata folks haven't programmed.

    Comment


    • #3
      Hi Phil,

      thanks for the reply. Actually this paper is the paper that I am going to write so no reference for it. I thought that it was the simplest way to show the type of calculations I need to implement.
      That said, I know it is not comfortable and I am sorry for that, but I have not found a latex font for writing in Statlist nor a quick way to write down formulas.

      Thank you again,

      Federico

      Comment

      Working...
      X