Skip to contents

Regresses dy_t on y_{t-1}, optionally a drift and trend, and lags lagged differences, and reports the t statistic on the level term. The null is a unit root, so LARGE NEGATIVE values reject it, and the statistic is not t-distributed under that null – compare it with the Dickey-Fuller critical values returned here, never with normal ones. Matches urca::ur.df.

Usage

morie_adf_test(y, lags = 1, kind = "drift")

Arguments

y

numeric series

lags

number of lagged differences

kind

"none", "drift" or "trend"

Value

list with statistic, critical_values and reject_5pct

Examples

morie_adf_test(y = c(2.5, 1.0, 3.5, 4.0, 2.0, 5.5, 3.0, 6.5))
#> $statistic
#> [1] -0.9548675
#> 
#> $kind
#> [1] "drift"
#> 
#> $lags
#> [1] 1
#> 
#> $n_used
#> [1] 6
#> 
#> $coef
#> [1] -0.7119004  3.2177020 -0.5602094
#> 
#> $se
#> [1] 0.7455488 2.4222967 0.4686850
#> 
#> $critical_values
#>  1pct  5pct 10pct 
#> -3.75 -3.00 -2.63 
#> 
#> $reject_5pct
#> [1] FALSE
#>