mono.1d {monoProc} | R Documentation |
this function applies a kernel smoothing method to monotonize a given fit with one independent variable
mono.1d(fit, bandwidth, xx, kernel = "epanech", mono1)
fit |
a list containing x-values and their corresponding y-values. The length of fit[[1]] determines degree of acuteness of the monotonizing procedure |
bandwidth |
a single number which represents the kernel bandwidth smoothing parameter. Missing values are not accepted. |
xx |
an additional vector of x-values where the monotonizing procedure is to be evaluated. If missing fit[[1]] is used instead. |
kernel |
"`epanech"' - the Epanechnikov kernel |
mono1 |
either "increasing" or "decreasing" |
this function is used within "monoproc"
returns an object of class "monofit"
Regine Scheder Regine.Scheder@rub.de
Dette, H., Neumeyer, N., and Pilz, K. (2004) A simple nonparametric estimator of a monotone regression function.
Dette, H. and Scheder, R. (2005) Striclty monotone and smooth nonparametric regression for two or more variable.
data(cars) speed<-cars$speed dist<-cars$dist fit1<-ksmooth(speed, dist, "normal", bandwidth=2) ##computes the Nadaraya-Watson estimate fit2<-mono.1d(list(x=fit1@x, y=fit1@y),bandwidth=0.7, mono1="increasing") ##calculates the monotone estimates plot(speed, dist) lines(fit1, col=2) lines(fit2, col=3)