Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
404 views
in Technique[技术] by (71.8m points)

r - 如何模拟小样本大小为10、15和20的ARIMA模型(How do I simulate any of the ARIMA Models with Small Sample Size of 10, 15 and 20)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...