1. Using appropriate notation, define the form of the Portmanteau statistics used by R. How can they be used to assess goodness-of-fit for time series models? With reference to the appropriate parts of the code and plots given above and/or prior, determine which of the two models, conc1.m or conc2.m, provides the best fit to the data. Justify your answer.

The Portmanteau statistic used by R is the Ljung – Box Test Statistic.

The Ljung-Box Test statistic is given by

Where

To test the goodness for fit, a null hypothesis that the model does not exhibit lack of fit and a loosely formulate alternative hypothesis that the model exhibits lack of fit are set. Given the time series Y of the length n and the Ljung-Box test statistic with alpha as the level of significance, the Ljung-Box tests rejects the null hypothesis to show that the model has significant lack of fit if

 

From the models, conc1.m and conc2.m, conc1.m has the parameters c (0,1,1) and conc2.m has c (0,1,0). (Reference to the part of code with red font).

> conc1.m <- arima (conc.ts, order = c(0, 1, 1), +seasonal = list(order = c(1, 1, 1), period = 12))

> conc2.m <- arima(conc.ts, order = c(0, 1, 0), +seasonal = list(order = c(1, 1, 1), period = 12))

This implies conc1.m has 0 autoregressive terms and 1 lagged forecast errors in the forecast equation while conc2.m has 0 autoregressive terms and 0 lagged forecast errors in the equation. Therefore, the conc2.m is best fit to the data.

d) i) Using arrays to store undefined number of objects is not encouraged in such cases because they are static. Use of Lists is recommended since they are dynamic hence their size keeps on changing.

ii) Ordering means there is a proper way you can predict the traversal of the content of a data holder while sorting is a type of ordering which adheres some special algorithm apart from the insertion order, like ascending or descending.

Ordering does not depend upon the property of the element inserted but sorting does.

Subscribe For Latest Updates
Let us notify you each time there is a new assignment, book recommendation, assignment resource, or free essay and updates