Rearrangement.estimation {LorenzRegression} | R Documentation |
Estimates a monotonic regression curve via Chernozhukov et al (2009)
Description
Rearrangement.estimation
estimates the increasing link function of a single index model via the methodology proposed in Chernozhukov et al (2009).
Usage
Rearrangement.estimation(
y,
index,
t = index,
weights = NULL,
method = "loess",
...
)
Arguments
y |
The response variable. |
index |
The estimated index. The user may obtain it using function |
t |
A vector of points over which the link function |
weights |
A vector of sample weights. By default, each observation is given the same weight. |
method |
Either a character string specifying a smoothing method (e.g.,
The specification of a custom method is illustrated in the Examples section.
If a character string is provided, a |
... |
Additional arguments passed to the fit function defined by |
Details
A first estimator of the link function, neglecting the assumption of monotonicity, is obtained using the procedure chosen via method
.
The final estimator is obtained through the rearrangement operation explained in Chernozhukov et al (2009). This operation is carried out with function rearrangement
from package Rearrangement.
Value
A list with the following components
t
the points over which the estimation has been undertaken.
H
the estimated link function evaluated at t.
References
Chernozhukov, V., I. Fernández-Val, and A. Galichon (2009). Improving Point and Interval Estimators of Monotone Functions by Rearrangement. Biometrika 96 (3). 559–75.
See Also
Examples
data(Data.Incomes)
PLR <- Lorenz.Reg(Income ~ ., data = Data.Incomes,
penalty = "SCAD", eps = 0.01)
y <- PLR$y
index <- predict(PLR)
# Default method where the first step is obtained with loess()
Rearrangement.estimation(y = y, index = index, method = "loess")
# Custom method, where the first step is obtained with ksmooth()
# ksmooth() lacks from a separation between fitting and predicting interfaces
ksmooth_method <- list(
fit_fun = function(y, x, ...) {
list(y = y, x = x, args = list(...))
},
predict_fun = function(fit, newdata) {
if(missing(newdata)){
x.points <- fit$x
} else {
x.points <- newdata[,1]
}
o <- order(order(x.points))
yhat <- do.call(ksmooth, c(list(x = fit$x, y = fit$y, x.points = x.points), fit$args))$y
yhat[o]
}
)
Rearrangement.estimation(y = y, index = index, method = ksmooth_method, bandwidth = 0.1)