Description Usage Arguments Value Author(s) References See Also Examples
Applies the generalised taut string method to one-dimensional data.
1 |
y |
observed values (ordered by value of independent variable) |
beta |
If method=1 specifies the quantile |
squeezing.factor |
The amount of decrement applied to the bandwidthes |
verbose |
logical, if T progress (for each iteration) is illustrated grahically |
localsqueezing |
logical, if T (default) the bandwidth is changed locally. |
DYADIC |
If T checks the multiresolution criterion only on dyadic intervals, otherwise all intervals are checked |
thr.const |
smoothing parameter for the multiresolution criterion (should be approximately 2.5) |
extrema.nr |
if set to a positive integer an approximation with the specified number of local extreme values is calculated |
bandwidth |
if set to a positive value the specified bandwidth is used instead of the multiresolution criterion. |
SETTOMEAN |
logical, if T (default) the value of the taut string approximation at local extreme values is set to the mean or median of the observations on the interval where the extremum is taken. |
method |
The method used which can be 1 (quantile regression), 2 (usual taut string), 3 (logistic regression) and 4 (Poisson regression) |
... |
Passed to the plot command if verbose=T |
A list with components
y |
The approximation of the given data |
lambda |
Values for lambda used |
nmax |
Number of local extreme values |
Arne Kovac A.Kovac@bristol.ac.uk
D\"umbgen, L. and Kovac, A. (2006) Extensions of smoothing via taut strings
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | data(djdata)
par(mfrow=c(2,2))
plot(djblocks,col="grey")
lines(genpmreg(djblocks,verbose=FALSE,method=2,thr.const=2.5)$y,col="red")
title("Usual taut string method")
ind <- sample(1:length(djblocks),300)
djblocks[ind] <- djblocks[ind]+rnorm(length(ind),0,100)
plot(djblocks,col="grey")
lines(genpmreg(djblocks,verbose=FALSE,method=2)$y,col="red")
title("Usual taut string method with outliers")
plot(djblocks,col="grey")
lines(genpmreg(djblocks,verbose=FALSE,method=1)$y,col="red")
title("Robust taut string method with outliers")
plot(djblocks,col="grey",ylim=c(-10,10))
lines(genpmreg(djblocks,verbose=FALSE,method=1)$y,col="red")
title("Again robust taut string method, different scaling of y-axis")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.