ts_fil_smooth: Time Series Smooth

View source: R/ts_fil_smooth.R

ts_fil_smoothR Documentation

Time Series Smooth

Description

Remove or reduce randomness (noise) using a robust smoothing strategy that first mitigates outliers and then smooths residual variation.

Usage

ts_fil_smooth()

Value

A ts_fil_smooth object.

Examples

# Robust smoothing with iterative outlier mitigation
# Load package and example data
library(daltoolbox)
data(tsd)
tsd$y[9] <- 2 * tsd$y[9]  # inject an outlier

# Fit smoother and transform to reduce spikes/noise
filter <- ts_fil_smooth()
filter <- fit(filter, tsd$y)
y <- transform(filter, tsd$y)

# Compare original vs smoothed series
plot_ts_pred(y = tsd$y, yadj = y)

tspredit documentation built on Feb. 11, 2026, 9:08 a.m.