vectorHarmonics: Fit harmonic trend model to time-series values

View source: R/vectorHarmonics.R

vectorHarmonicsR Documentation

Fit harmonic trend model to time-series values

Description

This is a wrapper function around harmonic from the TSA package that constructs harmonic functions for fitting a harmonic trend model.

Usage

vectorHarmonics(
  x,
  frq = 12L,
  st = c(1982, 1),
  nd = c(1986, 12),
  m = 2L,
  fun = stats::median
)

Arguments

x

Numeric. A vector containing time-series values.

frq

Integer, defaults to 12 (months). The number of observations per unit of time. See ts.

st

Numeric. A vector containing start year and month.

nd

Numeric. A vector containing end year and month.

m

Integer, defaults to 2. The number of pairs of harmonic functions to be created. See harmonic.

fun

Aggregating function to be applied to the fitted values.

Value

A numeric vector.

Author(s)

Tim Appelhans

See Also

harmonic


environmentalinformatics-marburg/GSODTools documentation built on Jan. 5, 2024, 12:19 a.m.