I have data that are strictly increasing and would like to fit a smoothing spline that is monotonically increasing as well with the smooth.spline()
function if possible, due to the ease of use of this function.
For example, my data can be effectively reproduced with the example:
testx <- 1:100
testy <- abs(rnorm(length(testx)))^3
testy <- cumsum(testy)
plot(testx,testy)
sspl <- smooth.spline(testx,testy)
lines(sspl,col="blue")
which is not necessarily increasing everywhere. Any suggestions?