Removes the least squares straight line, leaving
\(x_i - (a + b t_i)\). t defaults to 0, 1, 2, ..., which is
right only for evenly spaced observations.
Examples
Detrnd(c(1, 3.1, 5, 7.2, 9.1))
#> $estimate
#> [1] 2.03
#>
#> $detrended
#> [1] -0.02 0.05 -0.08 0.09 -0.04
#>
#> $fitted
#> [1] 1.02 3.05 5.08 7.11 9.14
#>
#> $intercept
#> [1] 1.02
#>
#> $slope
#> [1] 2.03
#>
#> $n
#> [1] 5
#>
#> $method
#> [1] "linear detrending by least squares"
#>
