Performs running mean smoothing of bandwidth s of
an EWS, such as that returned by the `ewspec`

function
of `wavethresh`

.

1 | ```
EWSsmoothRM(S, s)
``` |

`S` |
The spectrum to smooth |

`s` |
The bandwidth (or number of ordinates to include in the running mean) |

Each level of the EWS is subject to a running mean smooth. After smoothing a level the resultant smooth is shorter than the original level (due to the mean not being able to overlap the boundaries). This deficit is made up by augmenting the start of the smooth with a right number of smoothed values taken from the first smoothed value.

A EWS object contained in a `wd`

object of type "station"
which contains the smoothed spectrum.

G.P. Nason

Cardinali, A. and Nason, Guy P. (2013) Costationarity of
Locally Stationary Time Series Using costat.
*Journal of Statistical Software*, **55**, Issue 1.

Cardinali, A. and Nason, G.P. (2010) Costationarity of locally stationary
time series. *J. Time Series Econometrics*, **2**, Issue 2, Article 1.

1 2 3 4 5 6 7 8 9 10 11 12 | ```
#
# Make dummy time series
#
x <- rnorm(128)
#
# Compute spectrum, but don't do smoothing
#
xews <- ewspec(x, WPsmooth=FALSE)$S
#
# Now smooth the spectrum using running mean smoothing with bandwidth of 5
#
ans <- EWSsmoothRM(xews, s=5)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.