For the following series, find an appropriate Box-Cox transformation in order to stabilise the variance.
usnetelecusgdpmcopperenplanementsusnetelec0.5167714 is suggested lambda.
usgdp0.366352 is suggested lambda.
mcopper0.1919047 is suggested lambda.
enplanements-0.2269461 is suggested lambda.
Why is a Box-Cox transformation unhelpful for the cangas data?
I don’t see an improvement on Box-Cox transformation. Hence, Box-Cox transformation is not helpful.
What Box-Cox transformation would you select for your retail data (from Exercise 3 in Section 2.10)?
library(readxl)
retaildata <- readxl::read_excel("C:/Users/patel/Documents/Data_624/retail.xlsx", skip=1)
myts <- ts(retaildata[,"A3349398A"], frequency=12, start=c(1982,4))
autoplot(myts)## [1] 0.1231563
0.1231563 is suggested lambda value.
For your retail time series (from Exercise 3 in Section 2.10):
A. Split the data into two parts using
B. Check that your data have been split appropriately by producing the following plot.
C. Calculate forecasts using snaive applied to myts.train.
D. Compare the accuracy of your forecasts against the actual values stored in myts.test.
## ME RMSE MAE MPE MAPE MASE ACF1
## Training set 73.94114 88.31208 75.13514 6.068915 6.134838 1.000000 0.6312891
## Test set 115.00000 127.92727 115.00000 4.459712 4.459712 1.530576 0.2653013
## Theil's U
## Training set NA
## Test set 0.7267171
E. Check the residuals.
##
## Ljung-Box test
##
## data: Residuals from Seasonal naive method
## Q* = 671.41, df = 24, p-value < 2.2e-16
##
## Model df: 0. Total lags used: 24
Do the residuals appear to be uncorrelated and normally distributed?
Nope, it does not correlated with each other and not normally distributed
F. How sensitive are the accuracy measures to the training/test split?
It seems Mean Error is highly sensitive, RMSE, MAE, MPE, MASE are sensitive, and MAPE and ACF1 are not sensitive