simpledecomp function

simpledecomp decomposes a vector into trend, season and irregular component by linear regression approach

simpledecomp decomposes a vector into trend, season and irregular component by linear regression approach

simpledecomp(y, trend = 0, season = 0, Plot = FALSE)

Arguments

  • y: the series, a vector or a time series
  • trend: order of trend polynomial
  • season: period of seasonal component
  • Plot: logical, should a plot be produced?

Returns

out: (n,3) matrix - 1. column: smooth component

  • 2. column: seasonal component

  • 3. column: irregular component

Examples

data(GDP) out <- simpledecomp(GDP,trend=3,season=4,Plot=FALSE)
  • Maintainer: Rainer Schlittgen
  • License: GPL
  • Last published: 2021-10-30

Useful links