Formula: local-to-unity GLS detrending at abar = 1 + cbar / T with cbar = -7 (mean case) or cbar = -13.5 (trend case). Quasi-difference both the series and the deterministic terms,
ytil_1 = y_1, ytil_t = y_t - abar y_{t-1}
ztil_1 = z_1, ztil_t = z_t - abar z_{t-1}
regress ytil on ztil to get psi, form y^d = y - z psi, and run the ADF regression without deterministic terms, dy^d_t = rho y^d_{t-1} + sum_j c_j dy^d_{t-j} + e_t. The DF-GLS statistic is the t-ratio on rho.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Erstst(V)
#> $estimate
#> [1] 0.0127576
#>
#> $statistic
#> [1] 0.0127576
#>
#> $rho
#> [1] 8.293459e-19
#>
#> $se
#> [1] 6.5008e-17
#>
#> $abar
#> [1] 0.125
#>
#> $lags
#> [1] 1
#>
#> $nobs
#> [1] 6
#>
#> $n
#> [1] 8
#>
#> $method
#> [1] "Elliott-Rothenberg-Stock GLS-detrended ADF"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
