# seasonal.ave: Averaged Seasonal Component of Time Series In mar1s: Multiplicative AR(1) with Seasonal Processes

## Description

Extracts seasonal component of time series by averaging observations on the same position in the cycle.

## Usage

 `1` ```seasonal.ave(x, ave.FUN = mean, ...) ```

## Arguments

 `x` A univariate time series. `ave.FUN` Averaging function. `...` Additional arguments passed to `ave.FUN`.

## Value

A time series object with times from 0 to 1 and the same frequency as `x`.

`ave`, `seasonal.smooth` for alternative seasonal extraction method.
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28``` ```set.seed(19860306) ## Artificial example x <- ts(sin(2*pi*(3:97)/10) + 0.5*rnorm(length(3:97)), start = c(0, 3), frequency = 10) plot.default(time(x)%%1, x, xlab = "Phase") lines(seasonal.ave(x), col = "blue") lines(seasonal.ave(x, median), col = "green") legend("bottomleft", legend = c("Mean averaging", "Median averaging"), col = c("blue", "green"), lty = "solid") ## Realistic example data(nesterov.index, package = "mar1s") x <- log(nesterov.index[, "mean"]) x[x < -10] <- -Inf plot.default(time(x)%%1, x, xlab = "Phase", pch = ".") lines(seasonal.ave(x), col = "blue") lines(seasonal.ave(x, median), col = "green") legend("topleft", legend = c("Mean averaging", "Median averaging"), col = c("blue", "green"), lty = "solid") ```