cp.plt {dSTEM} | R Documentation |
Plot data sequence, the first and second-order derivatives, and their local extrema
Description
Plot data sequence, the first and second-order derivatives, and their local extrema
Usage
cp.plt(x, order, icd.noise, H)
Arguments
x |
numerical vector of signal or signal-plus-noise data |
order |
order of derivative of data |
icd.noise |
logical value indicating if |
H |
optional, vector of change-point locations |
Value
a plot
Examples
l = 1200
h = seq(150,by=150,length.out=6)
jump = c(0,1.5,2,2.2,1.8,2,1.5)*3
beta1 = c(2,-1,2.5,-3,-0.2,2.5,-0.5)/50
signal = gen.signal(l,h,jump,beta1)
noise = rnorm(length(signal),0,1)
gamma = 25
sdata = smth.gau(signal+noise,gamma)
dy = diff(sdata)
ddy = diff(sdata,differences=2)
cp.plt(signal,0,FALSE)
points(signal+noise,col="grey")
cp.plt(dy,1,H=h)
cp.plt(ddy,2,H=h)
[Package dSTEM version 2.0-1 Index]