I want to generate a continuous curve based on some data, but the curve needs to satisfy some constraints:
The data points also follow these rules.
Right now, I'm using smooth.monotone from the fda package to fit a bspline basis created with create.bspline.basis. This works great for preserving monotonicity between knots but the resulting curve seems to venture above 1 and below 0.
Is there a way to specify points that the curve fit must go through, or an interval that the curve cannot leave?
Transform your 0-1 variable so that it is asymptotically -Inf to +Inf, then do an unconstrained smooth, then invert the transformation.
Logit, or probit or something should help. Apologies for incompleteness, but you didn't supply a reproducible example and I've got things to do.