Forum Numerical Method Statistics
getting residuals
-
TAYUAN HSUParticipant 2017-05-16 at 6:44 am
Thanks for your reply. I have a question about LjungBox test. Based on the instruction of SuanShu, the constructor of Ljung-Box test is LjungBox(double[] x, int lag, int fitdf). However, by the definition of Ljung-Box, it runs a Ljung-Box test on the residuals of x. So, the constructor of Ljung-Box test in Matlab is Box.test(resid(x.arma), lag=20, type=”Ljung-Box”). In SuanShu, the first input is the residual of a time series or a time series itself?
- This topic was modified 8 months, 2 weeks ago by TAYUAN HSU.
- This topic was modified 8 months, 2 weeks ago by webmaster.
-
TAYUAN HSUParticipant 2017-05-17 at 10:01 pm
Hello,
I think the first input of Ljung-Box test in SuanShu should be the residuals of an ARMA model. In SuanShu, how do we get the residuals of an ARMA model? I can’t find a corresponding class to do it in SuanShu Javadoc. Can anyone help me? Thank you.
-
RyuParticipant 2017-05-18 at 9:50 am
The input to SuanShu Ljung-Box test is just a time series. As you pointed out, we normally pass in the residuals of the fitted time series.
In SuanShu, there is no call to compute the residuals at the moment. The user needs to compute them on their own (for now). We added this feature to the TODOs.