EstTrend: Estimates the trend function for a time series.

Description Usage Arguments Value Examples

View source: R/EstTrend.R

Description

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.

Usage

1
EstTrend(y, time, bandwidth)

Arguments

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.

Value

A vector of estimated values for the trend function at the given time-points.

Examples

1
2
3
4
5
6
 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)

SCEM documentation built on Sept. 5, 2021, 5:50 p.m.