How can I use a small number in arima.sim
function. In the bellow R
codes I simulates two ARIMA
models, one having n=10
the other having n=50
. After the simulations I used the auto.arima()
function from forecast
package to check for what the best model for the data simulated.
set.seed(456)
## list description for AR(1) model with small coef
AR.sm <- list(order=c(1,0,0), ar=0.9, sd=0.1)
## list description for AR(1) model with large coef
AR.lg <- list(order=c(1,0,0), ar=0.9, sd=0.1)
## simulate AR(1)
AR1.sm <- arima.sim(n=10, model=AR.sm)
AR1.lg <- arima.sim(n=50, model=AR.lg)
library(forecast)
auto.arima(AR1.sm)
auto.arima(AR1.sm)
How do I make my AR1.sm
so that if I check the best model through auto.arima(AR1.sm) and it will give me the order
ARIMA(1, 0, 0)and my
ARparameter will will be close to
0.9`.