Data-driven
window
width
adaption
for robust
online
moving
window
regression
Data-driven window width adaption
for robust online moving window regression
Matthias
Borowski
Matthias Borowski
Fakultät Statistik, TU Dortmund
COMPSTAT 2010, Paris
1
Situation
Data-driven
window
width
adaption
for robust
online
moving
window
regression
Online-monitoring time series: systolic blood pressure
180
160
xt
140
Matthias
Borowski
120
100
80
1
50
100
150
200
250
300
350
400
450
500
t
General assumption:
2
Xt
=
µt
+
εt
+
ηt
data
=
signal
+
noise
+
outliers
Online filtering by Repeated Median (RM) regression
Data-driven
window
width
adaption
for robust
online
moving
window
regression
12
Matthias
Borowski
4
data
local linear regression
^
µ
t
●
10
8
6
●
●
2
●
●
●
●
●
●
●
●
●
●
●
●
0
●
●
●
●
●
●
−2
0
20
40
t
60
80
100
RM regression (Siegel, 1982):
Slope
Level
3
xt−n+i − xt−n+j
β̂t = med
med
i −j
i ∈{1,...,n}
j6=i, j ∈{1,...,n}
n
o
µ̂t = med
xt−n+i − β̂t · (i − n)
i ∈{1,...,n}
Online filtering by Repeated Median (RM) regression
Data-driven
window
width
adaption
for robust
online
moving
window
regression
12
Matthias
Borowski
4
data
local linear regression
^
µ
t
●
10
8
6
●
●
2
●
●
●
●
●
●
●
●
●
●
●
●
●
0
●
●
●
●
●
●
−2
0
20
40
t
60
80
100
RM regression (Siegel, 1982):
Slope
Level
4
xt−n+i − xt−n+j
β̂t = med
med
i −j
i ∈{1,...,n}
j6=i, j ∈{1,...,n}
n
o
µ̂t = med
xt−n+i − β̂t · (i − n)
i ∈{1,...,n}
Online filtering by Repeated Median (RM) regression
Data-driven
window
width
adaption
for robust
online
moving
window
regression
12
Matthias
Borowski
4
data
local linear regression
^
µ
t
●
10
8
6
●
●
2
●
●
●
●
●
●
●
●
●
●
●
●
●
0
●
●
●
●
●
●
●
−2
0
20
40
t
60
80
100
RM regression (Siegel, 1982):
Slope
Level
5
xt−n+i − xt−n+j
β̂t = med
med
i −j
i ∈{1,...,n}
j6=i, j ∈{1,...,n}
n
o
µ̂t = med
xt−n+i − β̂t · (i − n)
i ∈{1,...,n}
Online filtering by Repeated Median (RM) regression
Data-driven
window
width
adaption
for robust
online
moving
window
regression
12
Matthias
Borowski
4
data
local linear regression
^
µ
t
●
10
8
6
●
●
2
●
●
●
●
●
●
●
●
●
●
●
●
●
●
0
●
●
●
●
●
●
●
−2
0
20
40
t
60
80
100
RM regression (Siegel, 1982):
Slope
Level
6
xt−n+i − xt−n+j
β̂t = med
med
i −j
i ∈{1,...,n}
j6=i, j ∈{1,...,n}
n
o
µ̂t = med
xt−n+i − β̂t · (i − n)
i ∈{1,...,n}
Online filtering by Repeated Median (RM) regression
Data-driven
window
width
adaption
for robust
online
moving
window
regression
12
Matthias
Borowski
4
data
local linear regression
^
µ
t
●
10
8
6
●
●
2
●
●
●
●
●
●
●
●
●
●
●
●
●
●
0
●
●
●
●
●
●
●
●
−2
0
20
40
t
60
80
100
RM regression (Siegel, 1982):
Slope
Level
7
xt−n+i − xt−n+j
β̂t = med
med
i −j
i ∈{1,...,n}
j6=i, j ∈{1,...,n}
n
o
µ̂t = med
xt−n+i − β̂t · (i − n)
i ∈{1,...,n}
Online filtering by Repeated Median (RM) regression
Data-driven
window
width
adaption
for robust
online
moving
window
regression
12
data
local linear regression
^
µ
t
●
10
8
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
● ●
●
●
●
●
●
●
●
●
●
6
●
●
●
●
●
●
●
●
●
●
●
●
●
4
●
●
●
●
●
●
●
Matthias
Borowski
●
●
●
●
●
●
●
●
●
●
● ●
●
●
●
●
●
2
●
● ●
●
●
●
●
●
●
●
●
●
●
●
0
●
●
●
●
●
● ●
● ●
●
●
●
●
●
●
●
●
●
●
●
−2
0
20
40
t
60
80
100
RM regression (Siegel, 1982):
Slope
Level
8
xt−n+i − xt−n+j
β̂t = med
med
i −j
i ∈{1,...,n}
j6=i, j ∈{1,...,n}
n
o
µ̂t = med
xt−n+i − β̂t · (i − n)
i ∈{1,...,n}
Repeated Median (RM) regression
Data-driven
window
width
adaption
for robust
online
moving
window
regression
Trade-off problem for window width (ww):
Large ww ⇒ smooth signal extraction
Small ww ⇒ exact signal extraction
Matthias
Borowski
Approach: data-driven ww selection for RM
At each time point t:
Test: Is window width n adequate for RM fit?
Yes: estimate signal
No: decrease n
9
Methods
Data-driven
window
width
adaption
for robust
online
moving
window
regression
Matthias
Borowski
ADORE – ADaptive Online REpeated Median
(Schettlinger et al., 2010)
SCARM – Slope Comparing Adaptive Repeated Median
(Borowski, 2010)
10
ADORE test
Data-driven
window
width
adaption
for robust
online
moving
window
regression
H0 : ww n adequate, if
# neg. residuals ≈ # pos. residuals
in right sub-window
●
Matthias
Borowski
4
●
●
●
●
20 pos. residuals
3
● ●
●
●
●
●
●
●
2
xt
●
●
●
●
●
●
●
RM fit
1
●
●
●
●
●
●
0
●
−1
●
●
10 neg. residuals
●
−2
1
11
25
50
t
75
100
SCARM test
Data-driven
window
width
adaption
for robust
online
moving
window
regression
left
β̂ − β̂ right H0 : ww n adequate, iff q
is small
Var (β̂ left − β̂ right )
4
Matthias
Borowski
3
xt
2
1
RM fit right sub−window
RM fit left sub−window
0
−1
−2
1
12
25
50
t
75
100
SCARM test
Data-driven
window
width
adaption
for robust
online
moving
window
regression
Matthias
Borowski
left
β̂ − β̂ right H0 : ww n adequate, iff q
is small
Var (β̂ left − β̂ right )
Sophisticated estimation of Var (β̂ left − β̂ right )
to increase power:
Use that RM slope is unbiased (symm. noise) and
regression equivariant
Estimate noise variability by regression-free scale estimator
(Gelper et al., 2009)
13
Power comparison ADORE vs. SCARM
Data-driven
window
width
adaption
for robust
online
moving
window
regression
Standard normal noise
Significance level 0.01
Several sizes of level shifts and trend changes
Level shifts
Trend changes
1.0
1.0
0.8
0.8
0.6
0.6
Power
Power
Matthias
Borowski
0.4
0.4
0.2
0.2
SCARM
ADORE
0.0
1
14
SCARM
ADORE
2
3
4
Shift height
5
6
0.0
0.1
0.2
0.3
Trend slope
0.4
0.5
Outlook
Data-driven
window
width
adaption
for robust
online
moving
window
regression
Matthias
Borowski
ww adaption based on
Shift detection (Fried, Gather, 2007)
Trend detection (Fried, Imhoff, 2004)
Further comparisons:
Other types of noise
Effect of outliers
SCARM in R package robfilter
(Fried, Schettlinger, Borowski, 2010)
15
References
Data-driven
window
width
adaption
for robust
online
moving
window
regression
Matthias
Borowski
Borowski, M. (2010): Window width adaption for robust moving window
regression in online-monitoring time series. Discussion Paper, to appear.
Fried, R., Gather, U. (2007): On rank tests for shift detection in time series.
CSDA 52, 221-233.
Fried, R., Imhoff, M. (2004): On the online detection of monotonic trends
in time series. Biometrical Journal 46, 90-102.
Fried, R., Schettlinger, K., Borowski, M. (2010): robfilter: Robust Time
Series Filters. R package version 2.6.1
Siegel, A. F. (1982): Robust regression using repeated medians. Biometrika
69(1), 242-244.
Gelper, S., Schettlinger, K., Croux, C., Gather, U. (2009): Robust online
scale estimation in time series: a regression-free approach. J. Stat. Plann.
Inf. 139, 335-349.
Schettlinger, K., Fried, R., Gather, U. (2010): Real time signal processing
by adaptive repeated median filters. Int. J. Adapt. Control Signal Process.
24, 346-362.
16
Estimation of Var (D)
Var (D) = Var β̂ left − β̂ right
∗
= Var β̂ left + Var β̂ right
*under H0 for i.i.d. symmetric noise with zero median
Var β̂ depends on ww n and on noise variance σ 2 :
Var β̂ =: V (n, σ) = V (n, 1) · σ 2
approximations V̂ (n, 1) =: vn for n = 5, . . . , 300 by
simulation
estimate noise variance σ 2 on residuals? ⇒ small power!
better: obtain σ̂ 2 by regression-free Q scale estimator
(Gelper et al., 2009)
Estimation of left
right
Var (D) = Var β̂
+ Var β̂
right 2
2
\
Var
(D) = v` · Q(x left
)
t ) + vr · Q(x t
d
∗
→ if |d | = q
right
v` · Q(x left )2 + vr · Q(x
)2 t
t
is ’too large’: reject H0
Critical values for D ∗ ?
D ∗ roughly N(0, 1) distributed for several noise
distributions
simulation: quantiles of the emp. distribution of d ∗ for
N(0, 1) noise
Application: Blocks data
SCARM arguments: r = 20, nmin = 40, nmax = 300, α = 0.001
Blocks Data and SCARM signal extraction
6
4
2
0
−2
−4
−6
data
signal
signal extraction
0
200
400
600
800
1000
600
800
1000
t
window widths
250
200
150
100
50
0
200
400
t
Application: Real data
SCARM arguments: r = 40, nmin = 80, nmax = 300, α = 0.001
Real data and SCARM signal extraction
data
signal extraction
160
140
120
100
0
100
200
300
400
500
400
500
t
window widths
180
160
140
120
100
80
60
40
0
100
200
300
t
© Copyright 2026 Paperzz