Skip to content
exuber

Recursive Augmented Dickey-Fuller

Tidy into a joint model

tidy_join
tidy_join(x, y, ...)

Tidy or augment and then join objects.

Arguments

x An object of class obj.
y An object of class cv.
... Further arguments passed to methods.

Value

A tibble joining the tidied statistics of x with the tidied critical values of y; see the methods for the exact columns.

Examples

These examples are copied from the package's own documentation and are run by R CMD check on every release. The printed output (after #>) and the plots were produced by running them against the current package source.

rsim <- radf(sim_data)
mc <- radf_mc_cv(nrow(sim_data), nrep = 200)
tidy_join(rsim, mc)
#> # A tibble: 45 × 5
#>    id    stat  tstat sig     crit
#>    <fct> <fct> <dbl> <fct>  <dbl>
#>  1 psy1  adf   -2.46 90    -0.289
#>  2 psy1  adf   -2.46 95     0.309
#>  3 psy1  adf   -2.46 99     0.775
#>  4 psy1  sadf   1.95 90     1.03 
#>  5 psy1  sadf   1.95 95     1.39 
#>  6 psy1  sadf   1.95 99     2.05 
#>  7 psy1  gsadf  5.19 90     1.69 
#>  8 psy1  gsadf  5.19 95     1.91 
#>  9 psy1  gsadf  5.19 99     2.40 
#> 10 psy2  adf   -2.86 90    -0.289
#> # ℹ 35 more rows
augment_join(rsim, mc)
#> # A tibble: 2,430 × 8
#>      key index id     data stat   tstat sig    crit
#>    <int> <dbl> <fct> <dbl> <fct>  <dbl> <fct> <dbl>
#>  1    20    20 psy1  104.  badf  -2.31  90    -0.44
#>  2    21    21 psy1  110.  badf  -2.36  90    -0.44
#>  3    22    22 psy1   98.1 badf  -2.49  90    -0.44
#>  4    23    23 psy1   91.0 badf  -2.26  90    -0.44
#>  5    24    24 psy1   80.4 badf  -1.63  90    -0.44
#>  6    25    25 psy1   69.2 badf  -0.815 90    -0.44
#>  7    26    26 psy1   72.3 badf  -0.960 90    -0.44
#>  8    27    27 psy1   67.7 badf  -0.693 90    -0.44
#>  9    28    28 psy1   69.1 badf  -0.771 90    -0.44
#> 10    29    29 psy1   65.4 badf  -0.609 90    -0.44
#> # ℹ 2,420 more rows