```
# NOT RUN {
# ARIMA(1,1,1) fitted to some data
ourModel <- ssarima(rnorm(118,100,3),orders=list(ar=c(1),i=c(1),ma=c(1)),lags=c(1),h=18,
holdout=TRUE,interval="p")
# The previous one is equivalent to:
# }
# NOT RUN {
ourModel <- ssarima(rnorm(118,100,3),ar.orders=c(1),i.orders=c(1),ma.orders=c(1),
lags=c(1),h=18,holdout=TRUE,interval="p")
# }
# NOT RUN {
# Model with the same lags and orders, applied to a different data
ssarima(rnorm(118,100,3),orders=orders(ourModel),lags=lags(ourModel),h=18,holdout=TRUE)
# The same model applied to a different data
ssarima(rnorm(118,100,3),model=ourModel,h=18,holdout=TRUE)
# Example of SARIMA(2,0,0)(1,0,0)[4]
# }
# NOT RUN {
ssarima(rnorm(118,100,3),orders=list(ar=c(2,1)),lags=c(1,4),h=18,holdout=TRUE)
# }
# NOT RUN {
# SARIMA(1,1,1)(0,0,1)[4] with different initialisations
# }
# NOT RUN {
ssarima(rnorm(118,100,3),orders=list(ar=c(1),i=c(1),ma=c(1,1)),
lags=c(1,4),h=18,holdout=TRUE)
ssarima(rnorm(118,100,3),orders=list(ar=c(1),i=c(1),ma=c(1,1)),
lags=c(1,4),h=18,holdout=TRUE,initial="o")
# }
# NOT RUN {
# SARIMA of a peculiar order on AirPassengers data
# }
# NOT RUN {
ssarima(AirPassengers,orders=list(ar=c(1,0,3),i=c(1,0,1),ma=c(0,1,2)),
lags=c(1,6,12),h=10,holdout=TRUE)
# }
# NOT RUN {
# ARIMA(1,1,1) with Mean Squared Trace Forecast Error
# }
# NOT RUN {
ssarima(rnorm(118,100,3),orders=list(ar=1,i=1,ma=1),lags=1,h=18,holdout=TRUE,loss="TMSE")
ssarima(rnorm(118,100,3),orders=list(ar=1,i=1,ma=1),lags=1,h=18,holdout=TRUE,loss="aTMSE")
# }
# NOT RUN {
# SARIMA(0,1,1) with exogenous variables
ssarima(rnorm(118,100,3),orders=list(i=1,ma=1),h=18,holdout=TRUE,xreg=c(1:118))
summary(ourModel)
forecast(ourModel)
plot(forecast(ourModel))
# }
```

Run the code above in your browser using DataCamp Workspace