找回密码
 注册
查看: 413|回复: 0

R语言 robfilter包 adore.filter()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-27 21:01:35 | 显示全部楼层 |阅读模式
adore.filter(robfilter)
adore.filter()所属R语言包:robfilter

                                        A Robust Adaptive Online Repeated Median Filter for Univariate Time Series
                                         中值滤波的鲁棒自适应在线重复单变量时间序列

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Procedure for robust online extraction of low frequency components (the signal) from a univariate time series by a moving window technique with adaptive window width selection (ADaptive Online REpeated median FILTER).
强大的在线提取的移动窗口技术与自适应窗口宽度选择单变量时间序列的低频成分(信号)的程序(自适应在线重复中值滤波器)。


用法----------Usage----------


                min.width = 11, max.width = 100, width.search="geometric",
                rtr=2, extrapolate=TRUE, calc.qn = FALSE)



参数----------Arguments----------

参数:y
a numeric vector or (univariate) time series object.
一个数值向量或单变量时间序列对象。


参数:p.test
defines the number of most recent Repeated Median residuals within each window used to test the goodness of fit of the online signal level. <br> It can be either a value in (0.25, 0.3, 0.5), meaning that floor(p.test*width) residuals are considered for the goodness of fit test, where width is the currently used window width, or it can also be a positive integer >= 5 specifying a fixed number of most recent residuals (default). <br> If the number of residuals considered for the test exceeds width/2, the procedure sets it to floor(width/2),  if it is smaller than five, the number is set to five.  
定义了一些最近期反复在每个窗口的残差中位数用来测试适合线上的信号电平的美好。参考它可以是一个值(0.25,0.3,0.5),这意味着floor(p.test*width)残余物会被视为善良的拟合优度检验,其中width是目前使用的窗口宽度,或也可以是一个正整数>= 5最近残差(预设值)的固定数量的指定。 <br>如果测试考虑残差数超过width/2,该过程设置floor(width/2),如果它是小于5,的数量设置为5个。


参数:minNonNAs
a positive integer >= 5 defining the minimum number of non-missing observations within one window which is required  for a "sensible" estimation.  
一个正整数>= 5限定非缺失观测的最小数目,在一个窗口中,这是需要的一个明智估计。


参数:min.width
a positive integer >= 5 specifying the minimal window width.  
一个正整数>= 5指定最小的窗口宽度。


参数:max.width
a positive integer >= min.width specifying the maximal window width.  
一个正整数>= min.width指定的最大的窗口宽度。


参数:width.search
a character string defining the search algorithm used for finding an adequate window width at each point in time.     
限定的搜索算法的字符串,用于在每个时间点上找到一个足够的窗口宽度。

"linear"The linear search always results in the largest window width possible and hence yields  the smoothest online signal.  However, if sudden changes (like level shifts) appear in the signal it requires a lot of computation time and thus, an increased variability of the extracted signal may be observed.   
"linear"的线性搜索都会导致在可能的最大窗口宽度,从而产生流畅的在线信号。然而,如果在该信号中出现的突然变化(如电平漂移),它需要大量的计算时间,从而可以观察到,所提取的信号的增加的变异。

"binary"The binary search is recommended if it can be expected that the window width needs  to be reduced drastically from a large to a very small value at certain times (for example at level shifts or trend changes). However, it may not always result in the largest possible window width.   
"binary"的二进制搜索建议,如果是可以预期,需要大幅减少到一个非常小的值,在特定的时间(例如,在电平漂移或趋势的变化)从一个大的窗口宽度。但是,它可能并不总是导致的最大可能的窗口宽度。

"geometric" (default)The geometric search is as fast as the binary search but it puts more weight on large window widths.  It offers a good compromise between the linear and the binary search (computation time vs. smooth output signal).      
"geometric"(默认)的几何搜索的二进制搜索一样快,但它把更多的重量,大窗口的宽度。它提供了一个很好的妥协之间的线性和二进制搜索(计算时间与平滑的输出信号)。


参数:rtr
a value in 0, 1, 2 specifying whether a 'restrict to range' rule should be applied.     
中的值0,1,2,指定是否“限制范围”的规则应适用。

rtr=0The estimated signal level consists of the last fitted value of a Repeated Median regression fit  within a time window of adequate width.  
rtr=0估计的信号电平由最后拟合值的足够的宽度的一个时间窗口内的一个重复回归拟合中位数。

rtr=1The level estimation is restricted to the range of the observations within each time window.  
rtr=1水平估计被限制的范围内的观察,在每个时间窗口。

rtr=2 (default)The level estimation is restricted to the range of the most recent observations  (specified by p.test) i.e., to the range of the observations which are used to evaluate the goodness of fit.     
rtr=2(默认值)的水平估计的范围仅限于最近期的意见(指定的p.test),即,这是用来评估的拟合优度的范围的意见。


参数:extrapolate
a logical indicating whether the level  estimations should be extrapolated to the beginning of the time series. The  extrapolation consists of all fitted values within the first  time window.  
一个逻辑指示的水平估计是否应当推断的时间序列的开头。外推是由所有的拟合值在第一时间内窗口。


参数:calc.qn
a logical indicating whether the Qn scale (Rousseeuw, Croux, 1993) should also be calculated along with the signal level  as an estimate of the standard deviation in each window. Here, the Qn command from the robustbase library is applied with the built-in finite sample correction.  
逻辑指示的QN垢(Rousseeuw,克鲁,1993)是否也应该一起作为估计值的标准偏差在每个窗口中的信号电平来计算。这里,Qn命令从robustbase图书馆中被施加与内置的有限样本校正。


Details

详细信息----------Details----------

The adore.filter works by applying Repeated Median (RM) regression (Siegel, 1982) to a moving time window with a length varying between  min.width and max.width.
adore.filter作品的重复中位数(RM)的回归(西格尔,1982年)移动时间窗口的长度变化之间min.width和max.width。

For each point in time, the window width is adapted to the current data situation by a goodness of fit test for the most recent signal level estimation.  The test uses the absolute value of the sum of the RM residuals in the subset specified by p.test. The critical value for the test decision corresponds to a slightly modified 0.95-quantile of the  distribution of the test statistic and is stored in the data set critvals.
对于每个时间点,将窗口宽度适于当前的数据的情况下由一个善良的最近期的信号电平的估计的适合性检验。该测试使用所指定p.test中的子集的RM残差的总和的绝对值。测试决定的临界值对应于一个稍微修改的0.95-位数的检验统计量的分布,被存储在设置critvals的数据。

A more detailed description of the filter can be found in
的过滤器的更详细的描述可以发现在


值----------Value----------

adore.filter returns an object of class adore.filter.   An object of class adore.filter is a list containing the  following components:
adore.filter返回一个对象类adore.filter。一个对象的类adore.filter的是一个列表,其中包含以下组件:


参数:level
a numeric vector containing the signal level extracted by the RM filter  with adaptive window width.
一个数值向量,包含提取的RM过滤器窗口宽度自适应的信号电平。


参数:slope
a numeric vector containing the corresponding slope within each time window.
一个数值向量含有相应的每个时间窗口内的斜率。


参数:width
a numeric vector containing the corresponding window width used for the level and slope estimations.
用于含有相应的窗口宽度的一个数值向量的水平和斜率估计。


参数:level.list
a list which contains with as many elements as the length of the input time series. If at time t, the window width was not reduced, the entry level.list[[t]] simply corresponds to level[t]. However, if more than one iteration took place, level.list[[t]] is a vector which contains all level estimations which were evaluated until the final estimate mu[t] passed the goodness of fit test and was stored.   
列表,其中包含与作为输入的时间序列的长度一样多的元素。如果在时间t,窗口的宽度也没有降低,该条目level.list[[t]]简单地对应于level[t]。但是,如果发生一个以上的迭代,level.list[[t]]是一个矢量,它包含了所有级别的估计进行评估,直到最后估计mu[t]通过拟合优度检验,并存储。


参数:slope.list
a list containing the slope estimations corresponding to the values in level.list.  
的列表中包含的斜率估计对应于在level.list的值。


参数:width.list
a list containing the window widths used for the estimations in level.list and slope.list.  
一个列表,其中包含用于在level.list和slope.list估计窗口的宽度。


参数:sigma
a numeric vector containing the corresponding scale within each time window estimated by the robust Qn estimator (only calculated if calc.qn = TRUE, else sigma does not exist).
含相应规模的一个数值向量估计健壮的青年估计在每一个时间窗口(只计算如果calc.qn = TRUE,其他sigma不存在)。

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 min.width, max.width, width.search, p.test, minNonNAs, rtr, extrapolate, and calc.qn.
此外,返回原来的输入时间序列返回列表成员列表成员y,用于分析和设置min.width,max.width,width.search, p.test,minNonNAs,rtr,extrapolate和calc.qn。

Application of the function plot to an object of class aoRM returns a plot showing the original time series  with the filtered output.
应用的功能plot对象的类aoRM返回一个图,显示的原始时间序列的过滤输出。


(作者)----------Author(s)----------


Karen Schettlinger



参考文献----------References----------

Real Time Signal Processing by Adaptive Repeated Median Filters, International Journal of Adaptive Control and Signal Processing, submitted.<br>
Robust Regression Using Repeated Medians, Biometrika 69 (1),  242-244.<br>
Alternatives to the Median Absolute Deviation, Journal of the American Statistical Association 88, 1273-1283.

参见----------See Also----------

robreg.filter, wrm.filter, madore.filter.
robreg.filter,wrm.filter,madore.filter。


实例----------Examples----------


# # # # # # # # # #[#########]
# Short and noise-free time series[时间短,无噪声系列]
series <- c(rep(0,30),rep(10,30),seq(10,5,length=20),seq(5,15,length=20))

# Adaptive online signal extraction without &amp; with 'restrict to range' rule[自适应网络信号提取不和“限制范围”规则]
t.without.rtr <- adore.filter(series, rtr=0)
plot(t.without.rtr)
t.with.rtr1 <- adore.filter(series, rtr=1)
lines(t.with.rtr1$level, col="blue")
t.with.rtr2 <- adore.filter(series)
lines(t.with.rtr2$level, col="green3",lty=2)
legend("top",c("Signal with rtr=1","Signal with rtr=2"),col=c("blue","green3"),lty=c(1,2),bty="n")

# # # # # # # # # #[#########]
# Short and noise-free time series + 1 outlier[时间短,无噪声系列+ 1离群]
ol.series <- series
ol.series[63] <- 3

# Adaptive online signal extraction without &amp; with 'restrict to range' rule[自适应网络信号提取不和“限制范围”规则]
t.without.rtr <- adore.filter(ol.series, rtr=0)
plot(t.without.rtr)
t.with.rtr1 <- adore.filter(ol.series, rtr=1)
lines(t.with.rtr1$level, col="blue")
t.with.rtr2 <- adore.filter(ol.series)
lines(t.with.rtr2$level, col="green3",lty=2)
legend("top",c("Signal with rtr=1","Signal with rtr=2"),col=c("blue","green3"),lty=c(1,2),bty="n")

# # # # # # # # # #[#########]
# Noisy time series with level shifts, trend changes and shifts in the scale of the error term[噪声时间序列的误差项的规模与水平的变化,趋势变化和转变的]
true.signal  <- c(rep(0,150),rep(10,150),seq(10,5,length=100),seq(5,15,length=100))
series2      <- true.signal + c(rnorm(250,sd=1), rnorm(200,sd=3), rnorm(50,sd=1))

# Adaptive online signal extraction with additional Qn scale estimation[额外的的QN规模估计自适应网络信号提取的]
s2 <- adore.filter(series2, calc.qn=TRUE)
par(mfrow=c(3,1))
plot(s2)
plot(s2$sigma,type="l",main="Corresponding Qn Scale Estimation",ylab="sigma",xlab="time")
lines(c(rep(1,250),rep(3,200),rep(1,150)),col="grey")
legend("topleft",c("True scale","Qn"),lty=c(1,1),col=c("grey","black"),bty="n")
plot(s2$width,type="l",main="Corresponding Window Width",ylab="width",xlab="time")


转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-25 03:44 , Processed in 0.023779 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表