# to illustrate concept of stationarity, undifferencing (integration) # given linear input trend for Yt: (1-B)^d*(1-B)^D*Yt = St # First differenced 1-backshifted linear trend Yt with noise (1-B)^1.Yt = St = constant ~ 1 # Twice differenced 1-backshifted linear trend Yt with noise (1-B)^2.Yt = St ~ 0 x <- c(1:144) + rnorm(144); plot(x) diff1 <- diff(x,1) plot(diff1) mean(diff1) diff2 <- diff(diff1,1) plot(diff2) mean(diff2) # First differenced 12-backshifted linear trend Yt with noise (1-B^12)^1.Yt = St = constant ~ 12 # Twice differenced 12-backshifted linear trend Yt with noise (1-B^12)^2.Yt = St ~ 0 x <- c(1:144) + rnorm(144); plot(x) diff1 <- diff(x,12) plot(diff1) mean(diff1) diff2 <- diff(diff1,12) plot(diff2) mean(diff2) # First differenced 12-backshifted linear trend Yt with noise (1-B^12).Yt = St = constant ~ 12 # First differenced 1-backshifted of this: (1-B)(1-B^12).Yt = St ~ 0 x <- c(1:144) + rnorm(144); plot(x) diff1 <- diff(x,12) plot(diff1) mean(diff1) diff2 <- diff(diff1,1) plot(diff2) mean(diff2) # CONCLUSIONS: 1. The "integrated" series can be 0, a const or at most a linear function for all orders of differencing s.t. d + D = 2 to give a stationary series with ~ 0. 2. The "integrated" series can be 0 or at most a constant for orders of differencing where d + D = 1 to give a stationary series with ~ 0.