Unlimited learning, half price | 50% off
Get 50% off unlimited learning

nandb (version 0.2.1)

ExpSmooth: Exponentially smooth a series of observations.

Description

This function assumes that the observations are evenly spaced and separated by 1 time unit (so choose your tau based on that).

Usage

ExpSmooth(obs, tau, extended = FALSE)

Arguments

obs

A numeric vector of observations (in order).

tau

The time scale for the exponential smoothing (see Stroud 1999).

extended

Logical. Has the series (obs) already been extended via via nandb:::MedReflectExtend()? If not, ExpSmooth will do this prior to smoothing as an edge-correction technique. You will probably never set this to TRUE, but BestTau() needs this feature.

Value

The smoothed series, a numeric vector of the same length.

Examples

Run this code
# NOT RUN {
ExpSmooth(1:10, 1)
# }

Run the code above in your browser using DataLab