我正在尝试使用frequencyconnectedness软件包对35个股票退货数据执行spilloverRollingDY12函数。
到目前为止
rm (list = ls(all=TRUE))
graphics.off()
install.packages("normtest")
install.packages("pastecs")
install.packages("sp")
install.packages("smooth")
install.packages("writexl")
library(sp)
library(pastecs)
library(normtest)
library(readxl)
library(writexl)
filterdata <- read_excel("F:/filterdata.xlsx")
returns<-filterdata[,(1:35)]
install.packages("vars")
library(vars)
install.packages("frequencyConnectedness")
library(frequencyConnectedness)
varest=VAR(returns, type = "both", lag.max = 10, ic="AIC")
rollingspillover<-spilloverRollingDY12(returns, n.ahead = 10,func_est = "var", window = 100 )
我得到的错误如下
> rollingspillover<-spilloverRollingDY12(returns, n.ahead = 10,func_est = "var", params_est = list(p=2, type="const"), window = 100 )
| | 0 % ~calculating Error in (function (x, y = NULL, na.rm = FALSE, use) :
unused arguments (p = 2, type = "const")
我对函数的param_est部分的使用感到困惑。您能否建议以35个回报作为输入,并期望以34个滚动指数作为输出,那么params_est是什么?