2 years ago
#36520
EvA
Grangertest in R
does someone knows what I am doing wrong? I tried everything I've seen on the internet to perform the Grangertest. The structure of my data is:
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"))
and the codes I've tried is:
grangertest(Netherlands ~ Belgium, order = 1, data = df_NLBG_tf)
grangertest(Netherlands, Belgium, order = 1)
The error I keep getting is: Error in charToDate(x) : character string is not in a standard unambiguous format
I tried to make the date numeric which also gave the same error.
r
time-series
causality
0 Answers
Your Answer