robreg.filter(robfilter)
robreg.filter()所属R语言包:robfilter
Robust Regression Filters for Univariate Time Series
单变量时间序列的稳健回归过滤器
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Procedures for robust (online) extraction of low frequency components (the signal) from a univariate time series by applying robust regression techniques to moving time windows.
健壮的(在线)提取的低频分量(信号)从一个单变量的时间序列稳健回归技术通过施加到移动的时间窗的程序。
用法----------Usage----------
robreg.filter(y, width, method = "all", h = floor(width/2)+1,
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(见下文),这需要一个奇数。
参数:method
a (vector of) character string(s) containing the method(s) to be used for robust approximation of the signal within one time window. It is possible to specify any combination of the values:
(矢量)字符串()含有(s)到强大的近似的信号被用于在一个时间窗内的方法。指定的值的任何组合是可能的:
"DR"Deepest Regression
"DR"的最深的回归
"LMS"Least Median of Squares regression
"LMS"中位数平方回归
"LQD"Least Quartile Difference regression
"LQD"的四分位差异回归
"LTS"Least Trimmed Squares regression
"LTS"最不修剪最小二乘回归
"MED"Median
"MED"中位数
"RM"Repeated Median regression
"RM"重复中位数回归
"all"all of the above (default) Using dr.filter, lms.filter, lqd.filter, lts.filter, med.filter or rm.filter forces "DR", "LMS", "LQD", "LTS", "MED" or "RM" respectively. <br> Currently, only method="MED" and method="RM" (med.filter / rm.filter) can handle missing values in the input time series. For the other regression filters missing values have to be replaced before the analysis.
"all"所有上述(默认)使用dr.filter,lms.filter,lqd.filter,lts.filter,med.filter或rm.filter力 "DR","LMS","LQD","LTS","MED"或"RM"分别。目前,只有method="MED"和method="RM"(med.filter/rm.filter)可以处理缺失值的输入时间序列。对于其它回归滤波器缺失值必须被替换之前的分析。
参数:h
a positive integer defining the trimming quantile for LTS regression.
一个正整数,定义微调位数为LTS回归。
参数:minNonNAs
a positive integer defining the minimum number of non-missing observations within one window which is required for a "sensible" estimation. Currently, this option only has an effect for the two methods "MED" and /or "RM" (see method).
限定非缺失观测的最小数目的一个正整数,在一个窗口中,这是需要的一个明智估计。目前,此选项仅影响这两种方法"MED"和/或"RM"(见method“)。
参数: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----------
robreg.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, robust regression methods are applied to a moving window, and the signal level is estimated by the fitted value either at the end of each time window for online signal extraction without time delay (online=TRUE) or in the
robreg.filter是适合于从时间序列中提取的低频分量(信号)与离群值可能被污染,并且可以包含电平漂移。对于这一点,稳健回归方法被施加到一移动窗口,并且信号电平的估计由拟合值的在线信号提取在每个时间窗口结束时没有时间延迟(online=TRUE),或在
值----------Value----------
robreg.filter returns an object of class robreg.filter. An object of class robreg.filter is a list containing the following components:
robreg.filter返回一个对象类robreg.filter。一个对象的类robreg.filter的是一个列表,其中包含以下组件:
参数:level
a data frame containing the signal level extracted by the filter(s) specified in method.
一个数据框由过滤器()中指定的method萃取含有的信号电平。
参数: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, method, h, minNonNAs, online and extrapolate.
此外,返回原来的输入时间序列返回列表成员列表成员y,用于分析和设置width,method,h, 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 estimated signal level is only returned as NA if the window the estimation is based on contains less than minNonNAs non-missing values.
缺少的值被视为通过省略他们的,从而通过降低相应的窗口宽度。估计的信号电平只返回NA,如果窗口包含小于minNonNAs非缺失值的估计是基于。
(作者)----------Author(s)----------
C++ code: Thorsten Bernholt and Robin Nunkesser<br>
Port to R: Roland Fried and Karen Schettlinger
参考文献----------References----------
Robust Signal Extraction for On-Line Monitoring Data, Journal of Statistical Planning and Inference 122, 65-78.<br> (earlier version: http://www.sfb475.uni-dortmund.de/berichte/tr02-02.ps)
Online Signal Extraction by Robust Linear Regression, Computational Statistics 21(1), 33-51. <br> (earlier version: http://www.sfb475.uni-dortmund.de/berichte/tr53-04.ps)
Robust Filters for Intensive Care Monitoring: Beyond the Running Median, Biomedizinische Technik 51(2), 49-56.
参见----------See Also----------
wrm.filter, robust.filter, dw.filter, hybrid.filter.
wrm.filter,robust.filter,dw.filter,hybrid.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)
# Filtering with all methods:[过滤用一切手段:]
y.rr <- robreg.filter(y, width=31, method=c("RM", "LMS", "LTS", "DR", "LQD"))
# Plot:[图:]
plot(y.rr)
# Delayed filtering with RM and LMS filter:[延迟RM和LMS滤波器的过滤:]
y2.rr <- robreg.filter(y,width=31,method=c("RM","LMS"))
plot(y2.rr)
# Online filtering with RM filter:[在线过滤与RM过滤器:]
y3.rr <- rm.filter(y,width=41,online=TRUE)
plot(y3.rr)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|