R version 4.6.0 alpha (2026-04-01 r89771 ucrt) Copyright (C) 2026 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(testthat) > library(unitrootests) > > test_check("unitrootests") Quantile ADF Unit Root Test Koenker & Xiao (2004), JASA, 99, 775-787 ------------------------------------------------------------ Variable : c(-0.626453810742332, -0.44281048652025, -1.2784390989303, 0.316841703207494, Variable : 0.646349475022855, -0.174118909095161, 0.313310143333325, 1.05163484846254, Variable : 1.62741620011603, 1.32202781295968, 2.83380898141053, 3.22365221782196, Variable : 2.60241163728015, 0.387711750102654, 1.51264266824576, 1.46770905923053, Variable : 1.45151879613158, 2.39535500681688, 3.21657620191497, 3.81047752313248, Variable : 4.7294548947407, 5.51159119547177, 5.58615617883696, 3.59680448297358, Variable : 4.2166302308683, 4.16050149133929, 4.00470598463396, 2.53395360073469, Variable : 2.05580354562607, 2.47374510582577, 3.83242465735482, 3.72963693001182, Variable : 4.11730854157119, 4.06350350098829, 2.68644394415968, 2.27144938086, Variable : 1.87715942714965, 1.81784603043846, 2.91787140242235, 3.68104715087989, Variable : 3.5165235546263, 3.2631618744898, 3.96012524989453, 4.51678844856819, Variable : 3.82803275401867, 3.12053759705655, 3.48511955919338, 4.2536524837088, Variable : 4.14130627155857, 5.02241399801278, 5.42051987837985, 4.80849348512908, Variable : 5.14961317655351, 4.02025008047271, 5.45327378217375, 7.43367368067961, Variable : 7.0664522042131, 6.02231757789657, 6.59203720533898, 6.45698260145816Variable : ) Model : Constant Quantile tau : 0.500 Optimal lags : 6 N (used) : 53 IC : aic ------------------------------------------------------------ Coefficient Estimates ------------------------------------------------------------ rho(tau) [QR] : -0.1377 rho [OLS] : -0.1182 alpha0(tau) : 0.6195 delta-sq : 0.6013 Half-life : --- ------------------------------------------------------------ Test Statistics ------------------------------------------------------------ t_n(tau) : -16.0625 *** U_n(tau) = n(rho-1) : -60.2988 ------------------------------------------------------------ Critical Values (Hansen 1995) ------------------------------------------------------------ 1% : -3.2400 5% : -2.7200 10% : -2.4600 ------------------------------------------------------------ Decision: Reject H0 at 1%: Strong evidence of stationarity Note: *** p<0.01, ** p<0.05, * p<0.10 H0: Unit root vs H1: Stationarity ------------------------------------------------------------ ------------------------------------------------------------ Quantile ADF Unit Root Test Koenker & Xiao (2004), JASA, 99, 775-787 ------------------------------------------------------------ Variable : c(-0.626453810742332, -0.44281048652025, -1.2784390989303, 0.316841703207494, Variable : 0.646349475022855, -0.174118909095161, 0.313310143333325, 1.05163484846254, Variable : 1.62741620011603, 1.32202781295968, 2.83380898141053, 3.22365221782196, Variable : 2.60241163728015, 0.387711750102654, 1.51264266824576, 1.46770905923053, Variable : 1.45151879613158, 2.39535500681688, 3.21657620191497, 3.81047752313248, Variable : 4.7294548947407, 5.51159119547177, 5.58615617883696, 3.59680448297358, Variable : 4.2166302308683, 4.16050149133929, 4.00470598463396, 2.53395360073469, Variable : 2.05580354562607, 2.47374510582577, 3.83242465735482, 3.72963693001182, Variable : 4.11730854157119, 4.06350350098829, 2.68644394415968, 2.27144938086, Variable : 1.87715942714965, 1.81784603043846, 2.91787140242235, 3.68104715087989, Variable : 3.5165235546263, 3.2631618744898, 3.96012524989453, 4.51678844856819, Variable : 3.82803275401867, 3.12053759705655, 3.48511955919338, 4.2536524837088, Variable : 4.14130627155857, 5.02241399801278, 5.42051987837985, 4.80849348512908, Variable : 5.14961317655351, 4.02025008047271, 5.45327378217375, 7.43367368067961, Variable : 7.0664522042131, 6.02231757789657, 6.59203720533898, 6.45698260145816Variable : ) Model : Constant Quantile tau : 0.500 Optimal lags : 6 N (used) : 53 IC : aic ------------------------------------------------------------ Coefficient Estimates ------------------------------------------------------------ rho(tau) [QR] : -0.1377 rho [OLS] : -0.1182 alpha0(tau) : 0.6195 delta-sq : 0.6013 Half-life : --- ------------------------------------------------------------ Test Statistics ------------------------------------------------------------ t_n(tau) : -16.0625 *** U_n(tau) = n(rho-1) : -60.2988 ------------------------------------------------------------ Critical Values (Hansen 1995) ------------------------------------------------------------ 1% : -3.2400 5% : -2.7200 10% : -2.4600 ------------------------------------------------------------ Decision: Reject H0 at 1%: Strong evidence of stationarity Note: *** p<0.01, ** p<0.05, * p<0.10 H0: Unit root vs H1: Stationarity ------------------------------------------------------------ ------------------------------------------------------------------------ Table 1. Unit Root Tests: x ------------------------------------------------------------------------ Test/Det | Level | 1st Diff | 2nd Diff ------------------------------------------------------------------------ ADF: Const | -2.9007 | -5.6608 | -3.4057 Const+Trend | -2.9007 | -5.6608 | -3.4057 ------------------------------------------------------------------------ PP: Const | -12.5143 | -40.9899 | -52.5140 Const+Trend | -12.5143 | -40.9899 | -52.5140 ------------------------------------------------------------------------ ------------------------------------------------------------------------ ------------------------------------------------------------------------ Table 1. Unit Root Tests: x ------------------------------------------------------------------------ Test/Det | Level | 1st Diff | 2nd Diff ------------------------------------------------------------------------ KPSS (null = stationary): Const | 0.1708 | 0.0789 | 0.0552 Const+Trend | 0.0554 | 0.0461 | 0.0552 ------------------------------------------------------------------------ ------------------------------------------------------------------------ ------------------------------------------------------------------------ Table 1. Unit Root Tests: a ------------------------------------------------------------------------ Test/Det | Level | 1st Diff | 2nd Diff ------------------------------------------------------------------------ ADF: Const | -7.1870 | -6.6907 | -5.5797 Const+Trend | -7.1870 | -6.6907 | -4.0769 ------------------------------------------------------------------------ ------------------------------------------------------------------------ ------------------------------------------------------------------------ Table 1. Unit Root Tests: b ------------------------------------------------------------------------ Test/Det | Level | 1st Diff | 2nd Diff ------------------------------------------------------------------------ ADF: Const | -2.5374 | -3.1113 | -4.0425 Const+Trend | -2.5374 | -3.1113 | -9.3163 ------------------------------------------------------------------------ ------------------------------------------------------------------------ ------------------------------------------------------------------------ Table 1. Unit Root Tests: x ------------------------------------------------------------------------ Test/Det | Level | 1st Diff | 2nd Diff ------------------------------------------------------------------------ ADF: Const | -9.8266 | -8.5459 | -7.6516 Const+Trend | -9.8266 | -8.5459 | -7.6516 ------------------------------------------------------------------------ ------------------------------------------------------------------------ [ FAIL 0 | WARN 31 | SKIP 0 | PASS 46 ] [ FAIL 0 | WARN 31 | SKIP 0 | PASS 46 ] > > proc.time() user system elapsed 2.35 0.37 2.71