Estimates the trend of ts using a robust discrete cosine transform.

est_trend(ts, robust = TRUE)

Arguments

ts

A numeric vector to detrend.

robust

Should a robust linear model be used? Default FALSE.

Value

The estimated trend.