0

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.)

Ishboo
  • 1
  • 1
  • 1
    What is `ca.jo`? `df_level`? `cajorls`? `ur.df`? Please make this question [reproducible](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) by including all necessary `library` calls and a *representative sample* of required data (perhaps using `dput(head(...))`). – r2evans Dec 09 '17 at 18:14
  • i apologize. library(ggplot2) library(forecast) library(urca) library(vars) library(Metrics) library(tseries) library(fUnitRoots) – Ishboo Dec 10 '17 at 02:37
  • > dput(head(error)) 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") – Ishboo Dec 10 '17 at 02:38
  • Please don't put data or multi-line code in a comment. Just edit your question and make it easy to read. – r2evans Dec 10 '17 at 05:21
  • Define df_level before using it in ca.jo. Do this above, so let's say more... – Erdogan CEVHER Dec 15 '17 at 06:17

0 Answers0