Learn R Programming

TrendLSW

Implements wavelet methods for analysis of nonstationary time series. See

McGonigle, E. T., Killick, R., and Nunes, M. (2022). Trend locally stationary wavelet processes. Journal of Time Series Analysis, 43(6), 895-917.

McGonigle, E. T., Killick, R., and Nunes, M. (2022). Modelling time-varying first and second-order structure of time series via wavelets and differencing. Electronic Journal of Statistics, 6(2), 4398-4448.

for full details.

Installation

You can install the released version of TrendLSW from CRAN with:

install.packages("TrendLSW")

You can install the development version of TrendLSW from GitHub with:

devtools::install_github("https://github.com/EuanMcGonigle/TrendLSW")

Usage

For detailed examples, see the help files within the package. We can generate a small example for performing trend and spectrum estimation as follows:

library(TrendLSW)

set.seed(1)

noise <- rnorm(512) * c(seq(from = 1, to = 3, length = 256), seq(from = 3, to = 1, length = 256))
trend <- seq(from = 0, to = 5, length = 512)
x <- trend + noise

Apply the TLSW function:

x.TLSW <- TLSW(x)

Visualise the estimated trend and spectrum:

plot(x.TLSW)

Copy Link

Version

Install

install.packages('TrendLSW')

Monthly Downloads

282

Version

1.0.6

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Euan T. McGonigle

Last Published

January 21st, 2026

Functions in TrendLSW (1.0.6)

get.boundary.timeseries

Calculate Boundary Extended Time Series
TLSW

Estimate Trend and Spectrum of Trend Locally Stationary Wavelet Process
TLSWlacf

Compute Localised Autocovariance Estimate of a TLSW Object
TLSWsim

Simulate Trend Locally Stationary Wavelet Process
celegansbio

Bioluminescence of C. Elegans
ewspec.diff

Estimation of Evolutionary Wavelet Spectrum of Non-Zero Mean Time Series via Differencing
z.labels

Activity Labels for Human Activity Monitoring
Cmat.calc

Cross Autocorrelation Wavelet Inner Product Matrix Calculation
ewspec.trend

Estimation of Evolutionary Wavelet Spectrum for Non-Zero Mean Time Series
Atau.mat.calc

Lagged Autocorrelation Wavelet Inner Product Calculation
z.acc

Z-Axis Acceleration for Human Activity Monitoring
wav.trend.est

Linear Wavelet Thresholding Trend Estimation of Time Series
summary.TLSW

Summary of Output Provided by the TLSW Function
TrendLSW-package

Wavelet Methods for Analysing Locally Stationary Time Series
wav.diff.trend.est

Wavelet Thresholding Trend Estimation of Time Series
plot.TLSW

Plot Trend and/or Spectrum Information in a TLSW Object
print.TLSW

Print an Object of Class TLSW