How can I use a small number in arima.sim
function.
(如何在arima.sim
函数中使用少量数字。)
In the bellow R
codes I simulates two ARIMA
models, one having n=10
the other having n=50
. (在下面的R
代码中,我模拟了两个ARIMA
模型,一个模型的n=10
,另一个模型的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. (模拟之后,我使用了forecast
包中的auto.arima()
函数来检查哪种模型最适合模拟数据。)
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
AR parameter will will be close to
0.9`.
(我如何制作我的AR1.sm
以便如果我通过auto.arima(AR1.sm) and it will give me the order
检查最佳模型auto.arima(AR1.sm) and it will give me the order
ARIMA( auto.arima(AR1.sm) and it will give me the order
and my
AR parameter will will be close to
0.9 `。)
ask by Daniel James translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…