inst/book-ex/Rcode-5-3.R

library(urca)
data(nporg)
gnp <- log(na.omit(nporg[, "gnp.r"]))
gnp.d <- diff(gnp)
gnp.ct.df <- ur.ers(gnp, type = "DF-GLS",
                    model = "trend", lag.max = 4)
gnp.ct.pt <- ur.ers(gnp, type = "P-test",
                    model = "trend")
gnp.d.ct.df <- ur.ers(gnp.d, type = "DF-GLS",
                      model = "trend", lag.max = 4)
gnp.d.ct.pt <- ur.ers(gnp.d, type = "P-test",
                      model = "trend")
cheaton/vars2 documentation built on May 29, 2019, 3:04 a.m.