Cool work! Do you plan to add the prediction intervals?
timeseries-ru opened this issue · comments
Hi!
It seems to be not so hard to add the intervals, since ctsa implements them.
Thanks
P.S. Sorry, I’m not able to do the pull request.
Hi, that's a great idea! You're right, ctsa
returns standard errors together with point predictions. Not sure why I missed that when porting. Will update the package soon..
Thanks!
Updated the package to return standard errors from ctsa
:
const [pred, errors] = arima(...)
To get 95% intervals you can do something like:
const intervals = errors.map((e, i) => [pred[i] - 1.96 * Math.sqrt(e), pred[i] + 1.96 * Math.sqrt(e)])
Thanks, it works!
https://repl.it/@AndrSaz/UnkemptCheerfulEmacs