Description Usage Arguments Value Author(s) Examples

View source: R/update.CADFtest.R

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.

1 2 |

`object` |
an object belonging to the class |

`change` |
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

1 2 3 4 5 6 7 8 9 | ```
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",
"criterion='BIC'"))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.