monreg.wrapper: Fit a monotonic regression function using monreg and cross validation
Description
Uses cross validation to select the optimal value of a tuning parameter
in the monreg function.
Usage
monreg.wrapper(x, y, hr.vals = seq(0.01, 0.4, l = 40), x0, folds = 5)
Arguments
x
predictor values
y
response values
hr.vals
values of the tuning parameter to evaluate using cross validation
x0
x values at which to compute fits. If missing, x0 is set to x
folds
number of folds to use in the cross-validation procedure
Value
Returns a monreg.
Warning
As of the current version of the srbern package, the monreg function in the monreg package has a memory leak in its C code. Calling the monreg function multiple times (e.g. in a simulation) will eventually consume all of the RAM on your computer and crash R.
Details
None.
References
Dette, H., Neumeyer, N., Pilz, K. F. (2006). "A simple nonparametric estimator of a strictly monotone regression function." Bernoulli 12(3), 469-490.