I want to simulate 10 ARIMA time-series data that will have the following order (1,0,1), (1,1,1) and (2,2,2). such that if I test each series with auto.arima function of forecast package it will give me what I have specified.
I have tried these
set.seed(123)
n <- 10
# white noise:
wn <- ts(rnorm(n))
# initialise the first two values:
arma11 <- arma22 <- wn[1:2]
# loop through and create the 3:1000th values:
for(i in 3:n){
arma11[i] <- arma11[i - 1] * 0.8 + wn[i - 1] * 0.3 + wn[i]
arma22[i] <- arma22[i - 1] * 0.862537 + arma22[i - 2] * (-0.3) + 0.8 * wn[i-1] -
0.3 * wn[i-2] + wn[i]
}
# turn them into time series, and for the last two, "integrate" them via cumulative sum
arma11 <- ts(arma11)
arima111 <- ts(cumsum(arma11))
arima222 <- ts(cumsum(cumsum(arma22)))
Test for ARIMA order
auto.arima(arma11, ic=c("bic"), approximation = F, allowdrift =F)
auto.arima(arima111, ic=c("bic"), approximation = F, allowdrift =F)
auto.arima(arima222, ic=c("bic"), approximation = F, allowdrift =F)
None of arma11 or arima111 or arima222 gives me the order I specified, can someone help me out?