O'Reilly logo

Data Analysis with R - Second Edition by Tony Fischetti

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Accuracy assessment

Just like with the prediction of continuous and categorical variables in the previous two chapters, honest assessments of model accuracy is of the upmost importance.

The typical first step in the assessment of forecasts is a thorough analysis of the residuals (again, the difference between the values the model gives and the actual observed values). This often includes plotting a histogram of the residuals (to check for a zero mean and symmetric distribution) and an ACF plot (to verify that there is no serial correlation in the residuals). Additionally, a great thing to do is to run a Ljung-Box test on the residuals to more qualitatively check for serial correlation. Luckily for us, the forecast package provides a function,  ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required