runrobscale: running robust scaling of arefw

Description Usage Arguments Value Examples

View source: R/runrobscale.R

Description

running robust scaling of arefw

Usage

1
runrobscale(arefw, k = 101, scale = TRUE)

Arguments

arefw

- data array to scale

k

- windows

scale

- should also scaling be applied

Value

list with scaled data runmed used to center the data and runmad the running MAD used for scaling

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
res = c(rnorm(1000,0,1),rnorm(2000,4,3))
res2 = runrobscale(res)
par(mfrow=c(2,1))
plot(res,type="p",pch="x",col=1,cex=0.3)
lines(res2$runmed,col=3)

y = runFun( res2$scaled, k=51, func=mad )
#hist(y)
y2 = runFun(res2$scaled,k=51,func=median)
plot(res2$scaled,pch="*")
lines(y2,col=2,lwd=3)
lines(y2+y,col=3,lwd=3)
lines(y2-y,col=3,lwd=3)

quantable documentation built on May 2, 2019, 4:05 p.m.