plotc(wine)
## Define a suitable transformation of the data
xv = c("log","season",12,"trend",1)
## Obtain residuals and check for stationarity
e = Resid(wine,xv)
test(e)
## Define a suitable ARMA model
a = arma(e,p=1,q=1)
## Obtain residuals and check for white noise
ee = Resid(wine,xv,a)
test(ee)
## Forecast future values
forecast(wine,xv,a)
Run the code above in your browser using DataLab