Page 1 of 1

Recursive Prediction Intervals (small sample)

Posted: Sat Mar 13, 2021 3:35 pm
by ac_1
Hi Tom,

I would like to calculate prediction intervals from recursive forecasts (small sample), is this the correct method?

Code: Select all

clear yhat_r_model2
clear dfs
clear dfs1
do regend = ibegin, iend
linreg(define=eqmodel2,print) y istart regend
# constant x1{1} x2{1} x3{1}
uforecast(equation=eqmodel2,from=regend+1,steps=1,stderrs=stderrs) yhat_r_model2
set dfs regend iend = %ndf
end do regend

set dfs1 ibegin+1 iend+1 = dfs{1}

prin / y dfs dfs1 yhat_r_model2 stderrs

set lower95 ibegin+1 iend+1 = yhat_r_model2+%invtcdf(.025,dfs1)*stderrs
set upper95 ibegin+1 iend+1 = yhat_r_model2+%invtcdf(.975,dfs1)*stderrs

prin / y yhat_r_model2 lower95 upper95
or are the stderrs via ?

Code: Select all

prj(stderrs=stderrs) yhat_r_model2 regend+1 regend+1

many thanks,
Amarjit

Re: Recursive Prediction Intervals (small sample)

Posted: Sun Mar 14, 2021 10:19 am
by TomDoan
Don't they give the same results? Without any dynamics in the model, the standard errors of forecast are computed the same way for any number of steps, just using the static projection formula.

Re: Recursive Prediction Intervals (small sample)

Posted: Mon Mar 15, 2021 5:54 am
by ac_1
Thanks - as in https://estima.com/ratshelp/index.html? ... ction.html Options -> STDERRS -> ERRORS -> Technical Information.