Learn R Programming

BETS (version 0.4.9)

ur_test: Perform unit root tests

Description

This function uses the package 'urca' to perform unit root tests on a pre-defined time series. Unlike urca functions, it returns a meaningful table summarizing the results.

Usage

ur_test(..., mode = "ADF", level = "5pct")

Arguments

...

Arguments passed on to urca functions

mode

A character. The type of the test. Set it to 'ADF' for Augmented Dickey-Fuller, 'KPSS' for KPSS or 'PP' for Phillips-Perron.

level

A character. The confidence level. Can be either '1pct' (not for KPSS), '2.5pct', '5pct' or '10pct'

Value

A list object. The first element is a data.frame with the test statistics, the critical values and the test results. The second, the model residuals.