hampel: Hampel Filter

Description Usage Arguments

View source: R/hampel.R

Description

hampel(x, k = 7, nsigma = 2) applies a Hampel filter to the input vector, x, to detect and remove outliers. For each sample of x, the function computes the median of a window composed of the sample and its six surrounding samples, three per side. It also estimates the standard deviation of each sample about its window median using the median absolute deviation. If a sample differs from the median by more than two standard deviations, it is replaced with the median. If x is a matrix, then hampel treats each column of x as an independent channel.

Usage

1
hampel(x, k = 7, nsigma = 2)

Arguments

x

a vector of data points.

k

the window size, default is 7.

nsigma

a number of standard deviations, default is 2.


FAUBZhang/BayesBoost documentation built on Dec. 17, 2021, 7:30 p.m.