启动FinMetrics模块之后,输入如下命令
*原来有序列chex和o1,创建时间序列 positions 属性,创建时间序列rchex和ro1
td = timeCalendar(y=2001:2120,format="%Y")
rchex=timeSeries(data=chex,pos=td)
ro1=timeSeries(data=o1,pos=td)
再估计方程rche=C+A*rchex(-1)+B*ro1
art = garch(rchex~ma(1)+seriesData(ro1), ~garch(1,1),trace=F)
就出现了如下的问题:
Problem in garch(rchex ~ ma(1) + seriesData(ro1), ..: Length of seriesData(ro1) (variable 1) is 1 != length of others (120)
即使是改成
art = garch(rchex~ma(1)+ro1, ~garch(1,1),trace=F)
Problem in garch(rchex ~ ma(1) + ro1, ~ garch(1, 1..: Length of ro1 (variable 1) is 11 != length of others (120)
chex和o1都是120x1的单列的数据,格式data.frame。经过创建时间序列之后rchex和ro1都是timeSeries。为什么模拟之后就出现了那样的问题了?
我觉得可能是本人定义时间序列上有问题,本人觉得小弟贴上数据,希望能有大大代为解答下,呵呵,先行谢过。