全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
48089 8
2011-03-22
新手问个初级问题,还请各位不吝赐教。
首先我想模拟一个Y(t)=0.75Y(t-1)+e(t)-0.75e(t-1)的方程,google了一下,给出的列子是:
## armaSim -

# Simulation:


x = armaSim(model = list(ar = c(0.5, -0.5), ma = 0.1), n = 1000)

但是套用时会说could not find function armasim。。。

紧接着,因为我需要fit an ARMA(1,1) to the simulated data,于是继续google,得到例子:
## armaFit -

# Estimate the Parameters:


fit = armaFit(~ arma(2, 1), data = x)


print(fit)

但是套用的时候又被说could not find function armafit。。。(泪牛满面)

然后我试验了上课时本来ok的GARCH的命令,得到了could not find function garch.sim。。。

到这里俺就彻底晕了……
还请各位老师同学指点一二,感谢感谢。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2011-3-22 04:47:42
Hey, every time you want to use a certain function, such as armaSim(), etc., you need to load the package(s) that provides that function. So, you need to add this statement before you run your above codes:
require(fArma);

You can install this package if you have not use it before.... just go to "package"->"install packages"->..... select fArma package, then install.  After you install the package, you can then
require(fArma);
...
you codes here
...
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2011-3-22 05:05:02
非常感谢!^ ^ok了!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2011-3-22 09:04:30
babilun 发表于 2011-3-22 04:47
Hey, every time you want to use a certain function, such as armaSim(), etc., you need to load the package(s) that provides that function. So, you need to add this statement before you run your above codes:
require(fArma);

You can install this package if you have not use it before.... just go to "package"->"install packages"->..... select fArma package, then install.  After you install the package, you can then
require(fArma);
...
you codes here
...
呵呵正解!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2011-4-12 21:26:30
感谢babilun,疑惑被解开了。
谢谢。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-5-17 16:42:50
babilun 发表于 2011-3-22 04:47
Hey, every time you want to use a certain function, such as armaSim(), etc., you need to load the pa ...
could not find function "anyDuplicated"
您知道这个函数在什么包里面吗 谢谢
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群