全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
2150 1
2013-01-07
rt

求各位高人进行一下指点,最好举例进行一下讲解LSTAR模型具体怎么操作?

或者是否有可以参考的书籍?

非常感谢
二维码

扫码加我 拉你入群

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

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

全部回复
2014-12-19 16:02:27
就lstar()这个函数就ok吧

具体函数是——
lstar(x, m, d=1, steps=d, series, mL, mH, mTh, thDelay,
thVar, th, gamma, trace=TRUE, include = c("const", "trend","none", "both"),
control=list(), starting.control=list())

比如下面这几个例子,给出的参数就比较全了——

#fit a LSTAR model. Note 'maxit': slow convergence
mod.lstar <- lstar(log10(lynx), m=2, mTh=c(0,1), control=list(maxit=3000))
mod.lstar
#fit a LSTAR model without a constant in both regimes.
mod.lstar2 <- lstar(log10(lynx), m=1, include="none")
mod.lstar2
#Note in example below that the initial grid search seems to be to narrow.
# Extend it, and evaluate more values (slow!):
controls <- list(gammaInt=c(1,2000), nGamma=50)
mod.lstar3 <- lstar(log10(lynx), m=1, include="none", starting.control=controls)
mod.lstar3
# a few methods for lstar:
summary(mod.lstar)
residuals(mod.lstar)
AIC(mod.lstar)
BIC(mod.lstar)
plot(mod.lstar)
predict(mod.lstar, n.ahead=5)
更多的看这个文档:http://cran.r-project.org/web/packages/tsDyn/tsDyn.pdf


二维码

扫码加我 拉你入群

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

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

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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