#Sim data and convert to sts object
disProgObj <- sim.pointSource(p = 0.99, r = 0.5, length = 208, A = 1,
alpha = 1, beta = 0, phi = 0,
frequency = 1, state = NULL, K = 1.7)
stsObj = disProg2sts( disProgObj)
#Call function and show result
res1 <- earsC(stsObj, control = list(range = 20:208,method="C1"))
plot(res1,legend.opts=list(horiz=TRUE,x="topright"),dx.upperbound=0)
# compare upperbounds depending on alpha
res3 <- earsC(stsObj, control = list(range = 20:208,method="C3",alpha = 0.001))
plot(res3@upperbound,t='l')
res3 <- earsC(stsObj, control = list(range = 20:208,method="C3"))
lines(res3@upperbound,col='red')
Run the code above in your browser using DataLab