The trend function for each individual time series is estimated non-parametrically by the local linear estimate (as discussed in Fan and Gijbels (1996)). Detailed description can be found in Chazin et al. 2019, Supplemental Materials 1.
EstTrend(y, time, bandwidth)
y | A vector of time series observations. |
---|---|
time | A vector of time points where the value of the trend needs to be estimated. |
bandwidth | Denotes the order of the bandwidth that should be used in the estimation process. bandwidth = k will mean that the bandwidth is n^k. |
A vector of estimated values for the trend function at the given time-points.
armenia_split = split(armenia,f = armenia$ID) band = -0.33 z = armenia_split[[1]]$oxygen n = length(z) ndx = (1:n)/n EstTrend(z,ndx,band)#> [1] -2.337246 -4.387957 -5.952830 -7.037858 -7.608749 -7.699147 -7.321368 #> [8] -6.386419 -4.934851 -2.954004