Summarizes information about radf_obj object.

# S3 method for radf_obj
tidy(x, format = c("wide", "long"), panel = FALSE, ...)

# S3 method for radf_obj
augment(x, format = c("wide", "long"), panel = FALSE, trunc = TRUE, ...)

Arguments

x

An object of class radf_obj.

format

Long or wide format (default = "wide").

panel

If TRUE then returns the panel statistics

...

Further arguments passed to methods. Not used.

trunc

Whether to remove the period of the minimum window from the plot (default = TRUE).

Examples

# \donttest{
dta <- data.frame(psy1 = sim_psy1(n = 100), psy2 = sim_psy2(n = 100))

rfd <- radf(dta)

# Get the test statistic
tidy(rfd)
#> # A tibble: 2 × 4
#>   id      adf  sadf gsadf
#>   <fct> <dbl> <dbl> <dbl>
#> 1 psy1  -2.34  2.92  3.04
#> 2 psy2  -2.22  5.15  5.15

# Get the test statisticsequences
augment(rfd)
#> # A tibble: 162 × 6
#>      key index id     data    badf   bsadf
#>    <int> <dbl> <chr> <dbl>   <dbl>   <dbl>
#>  1    20    20 psy1   80.3 -1.01   -1.01  
#>  2    20    20 psy2  105.  -1.54   -1.54  
#>  3    21    21 psy1   84.5 -1.35   -1.30  
#>  4    21    21 psy2  114.  -1.01   -0.834 
#>  5    22    22 psy1   92.1 -1.77   -1.71  
#>  6    22    22 psy2  129.  -0.0555  0.216 
#>  7    23    23 psy1   96.9 -1.90   -1.75  
#>  8    23    23 psy2  128.  -0.202  -0.0348
#>  9    24    24 psy1   94.4 -1.95   -1.72  
#> 10    24    24 psy2  141.   0.438   0.551 
#> # ℹ 152 more rows

# Get the panel test statistic
tidy(rfd, panel = TRUE)
#> # A tibble: 1 × 1
#>   gsadf_panel
#>         <dbl>
#> 1        1.79
# }