0

I am receiving an error message when I am trying to perform an ARDL in R.

install.packages("dynamac")
library(dynamac)

recession_data <- read_excel("recession_data copy.xls")
head(recession_data)

y <- ts(recession_data$USREC, start = c(1982,1,1), frequency = 12)
SPREAD <- ts(recession_data$T10Y3M, start = c(1982,1,1), frequency = 12)
stockprice <- ts(recession_data$WILL5000PRFC, start = c(1982,1,1), frequency = 12)

ardl.model <- dynardl(y ~ SPREAD + stockprice, data = recession_data, 
+                       lags = list("y" = 1, "SPREAD" = 1, "stockprice" = 1),
+                       diffs = c("SPREAD", "stockprice"), 
+                       ec = TRUE, simulate = FALSE)

Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x),  : 
  'data' must be of a vector type, was 'NULL'
MNS
  • 1
  • Hi! Without a sample of the data, it's very hard to give an answer to your problem. You can read about how to share data examples here: https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – Juan Bosco Apr 05 '22 at 21:50

0 Answers0