TomDoan wrote:Why are you using two DO loops rather than two SET instructions? Neither one of those is saving the calculations into different slots in a time series. You can use this for the LPDS:
set scores_rwwd iend+1 iend+steps = %LOGDENSITY(stderrs_rwwd^2,y-yhat_rwwd)
sstats(mean) iend+1 iend+steps scores_rwwd>>lpds_rwwd
disp 'lpds_rwwd' lpds_rwwd
Note, BTW, that the LPDS measure is likely to favor forecasting procedures which get a better value of the variance, than a better value of the mean.
set ncsq iend+1 iend+12 = yhat_D^2.0
sstats iend+1 iend+12 ncsq>>nc
set scores iend+1 iend+12 = %chisqrncdensity(stderrs_D,%ndf,nc)
sstats(mean) iend+1 iend+12 scores>>lpds
disp *.############ 'lpds' lpds
Return to Other Time Series Analysis
Users browsing this forum: No registered users and 6 guests