genpmreg: Piecewise monotone regression with generalised taut strings

Description Usage Arguments Value Author(s) References See Also Examples

Description

Applies the generalised taut string method to one-dimensional data.

Usage

1
genpmreg(y, beta = 0.5, squeezing.factor = 0.5, verbose = FALSE, localsqueezing = TRUE, DYADIC = TRUE, thr.const = 2, extrema.nr = -1, bandwidth = -1, SETTOMEAN = FALSE, method = 2, ...)

Arguments

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

Value

A list with components

y

The approximation of the given data

lambda

Values for lambda used

nmax

Number of local extreme values

Author(s)

Arne Kovac A.Kovac@bristol.ac.uk

References

D\"umbgen, L. and Kovac, A. (2006) Extensions of smoothing via taut strings

See Also

pmreg

Examples

 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")

ftnonpar documentation built on May 2, 2019, 3:04 a.m.

Related to genpmreg in ftnonpar...