med.filter(robfilter)
med.filter()所属R语言包:robfilter
Median (MED) filter
中位数(MED)过滤器
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function extracts signals from time series by means of a running median.
此函数从时间序列中提取的信号,通过一个运行中的中位数。
用法----------Usage----------
med.filter(y, width, minNonNAs = 5, online = FALSE, extrapolate = TRUE)
参数----------Arguments----------
参数:y
a numeric vector or (univariate) time series object.
一个数值向量或单变量时间序列对象。
参数:width
a positive integer defining the window width used for fitting.<br> If online=FALSE (see below) this needs to be an odd integer.
如果一个正整数,用于拟合定义窗口的宽度。<BR> online=FALSE(见下文),这需要一个奇数。
参数:minNonNAs
a positive integer defining the minimum number of non-missing observations within one window which is required for a "sensible" estimation.
限定非缺失观测的最小数目的一个正整数,在一个窗口中,这是需要的一个明智估计。
参数:online
a logical indicating whether the current level estimate is evaluated at the most recent time within each time window (TRUE) or centred within each window (FALSE). Setting online=FALSE requires the width to be odd. Default is online=FALSE.
一个逻辑指示的电流电平的估计是否在每个时间窗口内的最近的时间评价(TRUE)或每个窗口内居中(FALSE)。设置online=FALSE需要width为奇数的。默认是online=FALSE。
参数:extrapolate
a logical indicating whether the level estimations should be extrapolated to the edges of the time series. <br> If online=FALSE the extrapolation consists of the fitted values within the first half of the first window and the last half of the last window; if online=TRUE the extrapolation consists of the fitted values within the first time window.
一个逻辑指示的水平估计是否应当推断的时间序列的边缘。 <br>如果online=FALSE外推由上半年的第一个窗口和后半段的最后一个窗口内的拟合值;如果online=TRUE外推在第一时间内由拟合值窗口。
Details
详细信息----------Details----------
med.filter is suitable for extracting low frequency components (the signal) from a time series which may be contaminated with outliers and can contain level shifts. For this, the median is computed in a moving window, and the signal level is estimated either at the end of each time window for online signal extraction without time delay (online=TRUE) or in the centre of each time window (online=FALSE).
med.filter是适合于从时间序列中提取的低频分量(信号)与离群值可能被污染,并且可以包含电平漂移。对于这一点,该中位数的计算在一个移动的窗,和估计的信号电平在每个时间窗口结束时没有时间延迟的在线信号提取(online=TRUE)或在每个时间窗口的中心( online=FALSE“)。
值----------Value----------
med.filter returns an object of class robreg.filter. An object of class robreg.filter is a list containing the following components:
med.filter返回一个对象类robreg.filter。一个对象的类robreg.filter的是一个列表,其中包含以下组件:
参数:level
a data frame containing the extracted signal level.
的数据框包含所提取的信号电平。
参数:slope
a data frame containing the corresponding slope within each time window.
的数据框,在每个时间窗口中含有相应的斜坡。
In addition, the original input time series is returned as list member y, and the settings used for the analysis are returned as the list members width, minNonNAs, online and extrapolate.
此外,原有的输入时间序列的形式返回列表成员y,用于分析和设置列表成员width,minNonNAs,online和返回extrapolate。
Application of the function plot to an object of class robreg.filter returns a plot showing the original time series with the filtered output.
应用的功能plot对象的类robreg.filter返回一个图,显示的原始时间序列的过滤输出。
注意----------Note----------
Missing values are treated by omitting them and thus by reducing the corresponding window width. The signal estimation is only returned as NA if the window the estimation is based on contains less than minNonNAs non-missing values.
缺少的值被视为通过省略他们的,从而通过降低相应的窗口宽度。信号估计只返回NA,如果窗口包含小于minNonNAs非缺失值的估计是基于。
(作者)----------Author(s)----------
Roland Fried, Karen Schettlinger and Matthias Borowski
参考文献----------References----------
Robust Signal Extraction for On-Line Monitoring Data, Journal of Statistical Planning and Inference 122, 65-78.<br>
Online Signal Extraction by Robust Linear Regression, Computational Statistics 21(1), 33-51. <br>
Robust Filters for Intensive Care Monitoring: Beyond the Running Median, Biomedizinische Technik 51(2), 49-56.
参见----------See Also----------
robreg.filter
robreg.filter
实例----------Examples----------
# Generate random time series:[生成随机时间序列:]
y <- cumsum(runif(500)) - .5*(1:500)
# Add jumps:[添加跳转:]
y[200:500] <- y[200:500] + 5
y[400:500] <- y[400:500] - 7
# Add noise:[添加噪声:]
n <- sample(1:500, 30)
y[n] <- y[n] + rnorm(30)
# Online filtering with MED filter:[在线滤波与MED过滤:]
y.rr <- med.filter(y,width=41,online=FALSE)
plot(y.rr)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|