Title: | Nonparametric Monotone Regression |
---|---|
Description: | Estimates monotone regression and variance functions in a nonparametric model, based on Dette, Holger, Neumeyer, and Pilz (2006) <doi:10.3150/bj/1151525131>. |
Authors: | This version Kay Pilz and Steffanie Titoff. Earlier developements by Holger Dette and Kay Pilz. |
Maintainer: | Scott Kostyshak <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.1.4 |
Built: | 2025-02-25 05:00:26 UTC |
Source: | https://gitlab.com/scottkosty/monreg |
monreg provides a strictly monotone estimator of the regression function based on the nonparametric regression model.
monreg(x, y, a = min(x), b = max(x), N = length(x), t = length(x), hd, Kd = "epanech", hr, Kr = "epanech", degree = 1, inverse = 0, monotonie = "isoton")
monreg(x, y, a = min(x), b = max(x), N = length(x), t = length(x), hd, Kd = "epanech", hr, Kr = "epanech", degree = 1, inverse = 0, monotonie = "isoton")
x |
vector containing the x-values (design points) of a sample |
y |
vector containing the y-values (response) of a sample |
a |
lower bound of the support of the design points density function, or smallest fixed design point |
b |
upper bound of the support of the design points density function, or largest fixed design point |
N |
number or vector of evaluation points of the unconstrained nonparametric regression estimator (e.g. Nadaraya-Watson estimator) |
t |
number or vector of points where the monotone estimation is computed |
hd |
bandwith of kernel |
Kd |
Kernel for the density estimation step (monotonization step). 'epanech' for Epanechnikov, 'rectangle' for rectangle, 'biweight' for biweight, 'triweight' for triweight, 'triangle' for triangle, 'cosine' for cosine kernel |
hr |
bandwith of kernel |
Kr |
Kernel for the regression estimation step (unconstrained estimation). 'epanech' for Epanechnikov, 'rectangle' for rectangle, 'biweight' for biweight, 'triweight' for triweight, 'triangle' for triangle, 'cosine' for cosine kernel. |
degree |
Determines the method for the unconstrained estimation.
'0' for the classical Nadaraya-Watson estimate, '1' for the local linear estimate.
As well degree can be the vector of the unconditional estimator provided by the
user for the design points given in the vector |
inverse |
For '0' the original regression function is estimated, for '1' the inverse of the regression function is estimated. |
monotonie |
Determines the type of monotonicity. 'isoton´ if the regression function is assumed to be isotone, 'antinton' if the regression function is assumed to be antitone. |
Nonparametric regression models are of the form ,
where
is the regression funtion and
the variance function.
monreg
performs a monotone estimate of the unknown regression function
.
monreg
first estimates by an unconstrained nonparametric
method, the classical Nadaraya-Watson estimate or the local- linear estimate
(unless the user decides to pass his or her own estimate).
In a second step the inverse of the (monotone) regression function is calculated,
by monotonizing this unconstrained estimate. With the above notation and
for the unconstrained estimate, the second step writes as follows,
Finally, the monotone estimate achieved by inversion of .
monreg
returns a list of values
xs |
the input values x, standardized on the interval |
y |
input variable y |
z |
the points, for which the unconstrained function is estimated |
t |
the points, for which the monotone function values will be estimated |
length.x |
length of the vector x |
length.z |
length of the vector z |
length.t |
length of the vector t |
hd |
bandwidth used with the Kernel |
hr |
bandwidth used with the Kernel |
Kd |
kernel used for the monotonization step |
Kr |
kernel used for the initial unconstrained regression estimate |
degree |
method, which was used for the unconstrained regression estimate |
ldeg.vektor |
length of the vector degree. If ldeg.vektor is not equal to 1 the user provided the vector of the unconditional estimator for the design points given in the vector N |
inverse |
indicates, if the origin regression function or its inverse has been estimated |
estimation |
the monotone estimate at the design points |
...
This R Package was developed by Kay Pilz and Stefanie Titoff. Earlier developements of the estimator were made by Holger Dette and Kay Pilz.
monvardiff
and monvarresid
for monotone variance function estimation.
x <- rnorm(100) y <- x + rnorm(100) mon1 <- monreg(x, y, hd = .5, hr = .5) plot(mon1$t, mon1$estimation)
x <- rnorm(100) y <- x + rnorm(100) mon1 <- monreg(x, y, hd = .5, hr = .5) plot(mon1$t, mon1$estimation)
monvardiff provides a strictly monotone estimator of the variance function based on the nonparametric regression model.
monvardiff(x,y,a=min(x),b=max(x),N=length(x),t=length(x),r=2,hr,Kr="epanech", hd,Kd="epanech",degree=1,inverse=0,monotonie="isoton")
monvardiff(x,y,a=min(x),b=max(x),N=length(x),t=length(x),r=2,hr,Kr="epanech", hd,Kd="epanech",degree=1,inverse=0,monotonie="isoton")
x |
vector containing the x-values (design points) of a sample |
y |
vector containing the y-values (response) of a sample |
a |
lower bound of the support of the design points density function, or smallest fixed design point |
b |
upper bound of the support of the design points density function, or largest fixed design point |
N |
number or vector of evaluation points of the unconstrained nonparametric variance estimator (e.g. Nadaraya-Watson estimator) |
t |
number or vector of points where the monotone estimation is computed |
r |
order of the difference scheme, i.e. weights |
hr |
bandwith of kernel |
Kr |
Kernel for the variance estimation step (unconstrained estimation). 'epanech' for Epanechnikov, 'rectangle' for rectangle, 'biweight' for biweight, 'triweight' for triweight, 'triangle' for triangle, 'cosine' for cosine kernel |
hd |
bandwith of kernel |
Kd |
Kernel for the density estimation step (monotonization step). 'epanech' for Epanechnikov, 'rectangle' for rectangle, 'biweight' for biweight, 'triweight' for triweight, 'triangle' for triangle, 'cosine' for cosine kernel |
degree |
determines the method for the unconstrained variance estimation.
'0' for the classical Nadaraya-Watson estimate, '1' for the local linear estimate.
As well |
inverse |
for '0' the original variance function is estimated, for '1' the inverse of the variance function is estimated. |
monotonie |
determines the type of monotonicity. 'isoton' if the variance function is assumed to be isotone, 'antinton' if the variance function is assumed to be antitone. |
Nonparametric regression models are of the form ,
where
is the regression funtion and
the variance function.
monvardiff
performs a monotone estimate of the unknown variance function
.
monvardiff
first estimates by an unconstrained nonparametric
method, the classical Nadaraya-Watson estimate or the local- linear estimate
(unless the user decides to pass his or her own estimate). This estimation contains the usage of the
Pseudo-Residuals. In a second step the inverse of the (monotone) variance function is calculated
by monotonizing the unconstrained estimate from the first step. With the above notation and
for the unconstrained estimate, the second step writes as follows,
Finally, the monotone estimate is achieved by inversion of .
monvardiff
returns a list of values
xs |
the input values x, standardized on the interval |
y |
input variable y |
z |
the points, for which the unconstrained function is estimated |
t |
the points, for which the monotone variance function will be estimated |
length.x |
length of the vector x |
length.z |
length of the vector z |
length.t |
length of the vector t |
r |
order of the difference scheme, i.e. number of weights to calculate the pseudo-residuals |
hr |
bandwidth used with the Kernel |
hd |
bandwidth used with the Kernel |
Kr |
kernel used for the unconstrained variance estimate |
Kd |
kernel used for the monotonization step |
degree |
method, which was used for the unconstrained variance estimate |
ldeg.vektor |
length of the vector degree. If ldeg.vektor is not equal to 1 the user provided the vector of the unconditional variance estimator for the design points given in the vector N |
inverse |
indicates, if the origin variance function or its inverse has been estimated |
estimation |
the monotone estimate at the design points |
This R Package was developed by Kay Pilz and Stefanie Titoff. Earlier developements of the estimator were made by Holger Dette and Kay Pilz.
monreg
for monotone regression function estimation and monvarresid
for monotone variance function estimation by nonparametric residuals.
monvarresid provides a strictly monotone estimator of the variance function based on the nonparametric regression model.
monvarresid(x,y,a=min(x),b=max(x),N=length(x),t=length(x),h,K="epanech",hd,Kd="epanech", hr,Kr="epanech",mdegree=1,sdegree=1,inverse=0,monotonie="isoton")
monvarresid(x,y,a=min(x),b=max(x),N=length(x),t=length(x),h,K="epanech",hd,Kd="epanech", hr,Kr="epanech",mdegree=1,sdegree=1,inverse=0,monotonie="isoton")
x |
vector containing the x-values (design points) of a sample |
y |
vector containing the y-values (response) of a sample |
a |
lower bound of the support of the design points density function, or smallest fixed design point |
b |
upper bound of the support of the design points density function, or largest fixed design point |
N |
number or vector of evaluation points of the unconstrained nonparametric variance estimator (e.g. Nadaraya-Watson estimator) |
t |
number or vector of points where the monotone estimation is computed |
h |
bandwith of kernel |
K |
Kernel for the regression estimation step. 'epanech' for Epanechnikov, 'rectangle' for rectangle, 'biweight' for biweight, 'triweight' for triweight, 'triangle' for triangle, 'cosine' for cosine kernel |
hd |
bandwith of kernel |
Kd |
Kernel for the density estimation step (monotonization step). 'epanech' for "Epanechnikov, 'rectangle' for rectangle, 'biweight' for biweight, 'triweight' for triweight, 'triangle' for triangle, 'cosine' for cosine kernel |
hr |
bandwith of kernel |
Kr |
Kernel for the variance estimation step (unconstrained estimation). 'epanech' for "Epanechnikov, 'rectangle' for rectangle, 'biweight' for biweight, 'triweight' for triweight, 'triangle' for triangle, 'cosine' for cosine kernel. |
mdegree |
determines the method for the regression estimation.
'0'for the classical Nadaraya-Watson estimate, '1' for the local linear estimate.
As well |
sdegree |
Determines the method for the unconstrained variance estimation.
'0' for the classical Nadaraya-Watson estimate, '1' for the local linear estimate.
As well |
inverse |
For '0' the original variance function is estimated, for '1' the inverse of the variance function is estimated. |
monotonie |
Determines the type of monotonicity. 'isoton' if the variance function is assumed to be isotone, 'antinton' if the variance function is assumed to be antitone. |
Nonparametric regression models are of the form ,
where
is the regression funtion and
the variance function.
monvarresid
performs a monotone estimate of the unknown variance function
.
monvarresid
first estimates by an unconstrained nonparametric
method, the classical Nadaraya-Watson estimate or the local-linear estimate
(unless the user decides to pass his or her own estimate).
In a second step an unconstrained estimation for
is performed, again by the classical
Nadaraya-Watson method or the local-linear estimate
(unless the user decides to pass his or her own estimate).
In a third step the inverse of the (monotone) variance function is calculated,
by monotonizing the unconstrained estimate from the second step. With the above notation and
for the unconstrained estimate, the third step writes as follows,
Finally, the monotone estimate is achieved by inversion of .
monvarresid
returns a list of values
xs |
the input values x, standardized on the interval |
y |
input variable y |
z |
the points, for which the unconstrained function is estimated |
t |
the points, for which the monotone variance function will be estimated |
length.x |
length of the vector x |
length.z |
length of the vector z |
length.t |
length of the vector t |
h |
bandwidth used with the Kernel |
hd |
bandwidth used with the Kernel |
hr |
bandwidth used with the Kernel |
K |
kernel used for the regression estimation step |
Kd |
kernel used for the monotonization step |
Kr |
kernel used for the unconstrained variance estimate |
mdegree |
method, which was used for the unconstrained regression estimate |
lmdeg |
length of the vector mdegree. If lmdeg is not equal to 1 the user provided the vector of the unconditional regression estimator for the design points given by the vector x |
sdegree |
method, which was used for the unconstrained variance estimate |
lsdeg |
length of the vector sdegree. If lsdeg is not equal to 1 the user provided the vector of the unconditional variance estimator for the design points given by the vector N |
inverse |
indicates, if the origin variance function or its inverse has been estimated |
estimation |
the monotone estimate for the variance function at the design points |
This R Package was developed by Kay Pilz and Stefanie Titoff. Earlier developements of the estimator were made by Holger Dette and Kay Pilz.
monreg
for monotone regression function estimation and monvardiff
for monotone variance function estimation by differences.