# Why do sample ACF/PACF suggest different TS models after box-cox transformation?

I use auto.arima function in R to fit a TS model to a annual data composed of electricity demand. The series is transformed w.r.t Box-Cox lambda due to the prevailing heteroscedasticity and then it is twiced differenced to eliminate the trend in the data. The first ACF/PACF plot (w/o transformation) suggest that an ARIMA model should be fitted to the model; whereas the second ACF/PACF (with transformation) plot suggests that an AR model should be fitted. However both of them depend on the same data. In both of the case, the auto.arima function selects the best model as ARIMA(1,2,1) which can be expected according to the first plot but not according to the second plot due to the one spike in PACF.

dmnd=c(8.6,9.8,11.2,12.4,13.5,15.7,18.6,21.1,22.3,23.6,24.6,26.3,28.3,29.6,33.3,36.4,40.5,44.9,48.4,52.6,56.8,60.5,67.2,73.4,77.8,85.6,94.8,105.5,


114.0,118.5,128.3,126.9,132.6,141.2,150.0,160.8,174.6,190.0,198.1,194.1,210.4,230.3,242.4,246.4,257.2)

x=ts(dmnd,frequency=1)

sdx=diff(x,differences = 2)
x1<-acf(sdx,length(sdx),ylab="Sample ACF",main ="")
x2<-pacf(sdx,length(sdx),ylab="Sample PACF",main ="")

library(FitAR)

#transformation
fit=arima(x,order=c(0,2,0))
BoxCox(fit, interval = c(-1, 1), type = "BoxCox")

library(forecast)
tx=BoxCox(x, -0.049)

sdx=diff(tx,differences = 2)
x1<-acf(sdx,length(sdx),ylab="Sample ACF",main ="")
x2<-pacf(sdx,length(sdx),ylab="Sample PACF",main ="")

fit=auto.arima(x,d = 2,D = 0,start.p=0, start.q=0, max.p=5, max.q=5,stationary=FALSE,seasonal=FALSE,stepwise=TRUE,trace=TRUE,approximation=FALSE,allowdrift=TRUE,ic="aicc",lambda=-0.049)

par(mfrow=c(1,2))
x1<-acf(fit$residuals,length(fit$residuals),ylab="Sample ACF",main ="")
x2<-pacf(fit$residuals,length(fit$residuals),ylab="Sample PACF",main ="")

Box.test(fit$residuals, lag = length(fit$residuals)/5, type = c("Ljung-Box"), fitdf = length(fit$coef)) shapiro.test(fit$residuals)

library(TSA)
x.standard=rstandard.Arima(fit)
qqnorm(x.standard,main ="")
qqline(x.standard)


Results of ARIMA(3,1,0) Model Shapiro-Wilk normality test

data:  fit$residuals W = 0.8557, p-value = 5.153e-05 Box-Ljung test data: fit$residuals
X-squared = 14.2044, df = 6, p-value = 0.02743


Diagnostics of Residuals ARIMA(1,1,1) transformed  auto.arima result for the series without the observations "32, 40, 41" • You might want to share the data as optimal Box-Cox transforms should be based upon the residuals from a useful model not necessarily the original series. . – IrishStat Aug 30 '15 at 22:01
• @IrishStat There exists dispersion in the original data so the transformformation should be carried out. I posted the data and the codes that I use. – Dirk Aug 30 '15 at 22:40
• Dispersion in the original data may be caused by unusual values , changes in model parameters over time etc. Either way the requirements for the F Test and the T test are that the errors from a model have constant variance not that the errors around a simple mean have constant variance. When you analyze the original series you are implicitely assuming a simple mean is the best model. I will look at your data. – IrishStat Aug 30 '15 at 23:39
• I should also comment that variance change can sometimes be at a particular points in time culminating in Weighted Least Squares.. Box - Cox transforms remedies linkage between the expected value of Y and the dispersion in the error process. The treat different non-constant error variance symptoms. – IrishStat Aug 31 '15 at 2:01
• @IrishStat The forecasts does not seem better without the transformations. Well, I think that the sample ACF and PACF does not always reflect the theoretical patterns. If the model is chosen based on AICc and the diagnostic tests are satisfied, the box-cox transformed model is adequate. – Dirk Aug 31 '15 at 13:15

I took your data (45 observations) into AUTOBOX ( a piece of software that I have helped develop) and it automatically tested for a deterministic change in error and optionally for a Box-Cox transformation. The preferred model is here logs being found to be optimal . When and where to apply Box-Cox is here When (and why) should you take the log of a distribution (of numbers)? . The acf of the residuals from this hybrid model and the plot of actual/fit/forecast is here . The forecasts are shown here . The conclusion that only first differences are needed along with an AR(3) polynomial (without lag2 ) and three pulse indicators at (32,40 and 41)