有人知道我做错了什么吗?我尝试了我在互联网上看到的所有东西来执行 Grangertest。我的数据结构是:
structure(list(Belgium = c(10786, 9902, 11119, 10218, 10454,
11014), Netherlands = c(14929, 13905, 14994, 14753, 15031, 15386
), Date = structure(c(14610, 14641, 14669, 14700, 14730, 14761
), class = "Date")), row.names = c(NA, -6L), class = c("tbl_df",
"tbl", "data.frame"))
我试过的代码是:
grangertest(Netherlands ~ Belgium, order = 1, data = df_NLBG_tf)
grangertest(Netherlands, Belgium, order = 1)
我不断收到的错误是: charToDate(x) 中的错误:字符串不是标准的明确格式
我试图将日期设为数字,这也给出了同样的错误。