# Does my ACF and PACF suggest no random noise?

I have 77 observations in my time series data which I obtained from the tsdl library in R. I have also reduced the time window. The data is quarterly average earnings.

library(tsdl)
data<-tsdl[[94]]
data2<-window(data,end=c(1975,1))
earn<-data2[,3]



I have differenced the data twice and taken a power transformation which lambda equal to -0.03. After differencing, the Dickey-Fuller test has a test statistic of -6.61 and p-value = 0.01.

lam<-BoxCox.lambda(earn)
trans.earn<-BoxCox(earn, lambda = lam)

nsdiffs(earn)
ndiffs(earn)

trans<-diff(trans.earn, lag=4, differences = 1)
trans<-diff(trans, differences = 1)


I now need to fit AR, MA, ARMA, ARIMA and SARIMA models. Here are the ACF and PACF:

There is a significant spike at lag 4 in the ACF and then at lag 4,6 and 116 in the PACF. I am new to time series and have been struggling with these plots for a while. What do these plots tell me? Is there still some seasonality in my data? What would the p and q be for AR(p) and MA(q) models?

The Ljung-Box Test statistic is 1.14 and has a p-value of 0.29, does this suggest that there is no dependence left in my data? I cannot fit ARMA models? The auto.arima suggest the following model: ARIMA(0,1,1)(0,1,1)[4]

• The data does not seem to have a unit root, so you should not have differenced it even once. By differencing twice, you have quadrupled (I think) your error variance without gaining anything. Oct 14 at 7:54
• An adf.test on the original data, adf.test(earn), has a test statistic of -0.07 and p-value of 0.99. This suggests that it has unit root? Oct 14 at 8:23
• This interpretation is only correct if you have specified the test model correctly. You should first take care of the rather obvious deterministic trend in the data. Having adjusted for it, you would not see any evidence of a unit root anymore. Oct 14 at 8:27
• As I understand, I have differenced once for the trend and then differenced again for the seasonality. The resulting time series does have unit root. Oct 14 at 8:47
• @anemone19: you'd be served well to heed Richard Hardy's advice. Keep in mind that the first step in a univariate time series model like this is to remove the deterministic components: trend and seasonality and potentially to do a variance stabilizing transformation in order to obtain a stationary series; it is that resulting stationary series that you want to model and not the one that has all these components lumped together. Oct 14 at 9:56

To get a sense of the trend: plot(decompose(earn))
You can detrend like this plot(earn-decompose(earn)$trend) or for example if you think you have a linear trend like this plot(lm(earn~c(1:length(earn)))$res,type="l") or analogously for say a quadratic trend plot(lm(earn~c(1:length(earn))+c(1:length(earn))^2)\$res,type="l")). Check for seasonality. Then apply a box-cox variance-stabilizing transformation like you did to the resultant series. You will thus have removed the deterministic components without differencing. Now you're ready to model the stochastic component of this process. To forecast your series, when you're done modeling the stochastic component of the process, you'll have to bring back the deterministic components so as to reassemble the full series. That being said, if you don't think the past trend will extend into the future, first-differencing as you did may be the better way to go.