I am just trying to run ur.df
on a specific set of information, but it keeps saying that it is not a vector, or matrix, even though it is a sequential set of information.
Code:
library(ggplot2)
library(forecast)
library(urca)
library(vars)
library(Metrics)
library(tseries)
library(fUnitRoots)
vecm = ca.jo(df_level, type= c("eigen"), ecdet= c("const"), K=2, spec= c("transitory"))
vecm.rls <- cajorls(vecm, r = 1)
error <- vecm.rls$rlm$model['ect1']
structure(list(ect1 = c(-0.167123621200091, 0.0355886318325172,
-0.0551981508361803, -0.120115360368026, -0.270394846503358,
-0.234452854475312)), .Names = "ect1", row.names = c(NA, 6L), class = "data.frame")
errorADF = ur.df(error, type = c('none'), lags = 1, selectlags = c('Fixed'))
summary(errorADF)
(btw, total novice here and this is for a final project.)