update.CADFtest {CADFtest}R Documentation

Function to update the formula of CADFtest objects


This function updates the formula and/or the other arguments of CADFtest object and re-run the test using the updated arguments. It can be useful if one wants to see the effect of adding/removing stationary covariates or the effect of changing lags, kernel, etc. If covariates have to be added/removed, update() works only if model is passed as a formula.


  ## S3 method for class 'CADFtest'
update(object, change, ...)



an object belonging to the class CADFtest.


list of charater describing the changes to be applied to the existing model.


currently not used.


The function re-run the test and returns an object of class CADFtest. See CADFtest().


Claudio Lupi


  data(npext, package="urca")
  npext$unemrate <- exp(npext$unemploy)      # compute unemployment rate
  L <- ts(npext, start=1860)                 # time series of levels
  D <- diff(L)                               # time series of diffs
  S <- window(ts.intersect(L,D), start=1909) # select same sample as Hansen's
  CADFt <- CADFtest(L.gnpperca~D.unemrate, data=S, max.lag.y=3,
    kernel="Parzen", prewhite=FALSE)
  CADFt.2 <- update(CADFt, change=list("+ D.indprod", "max.lag.X=3", 

[Package CADFtest version 0.3-3 Index]