Fits a monotonic cubic spline to the data provided, using the penalized
constrained least squares method from the mgcv package.
Details
This uses the pcls function from the mgcv package to produce
the fit. The monotonicity constraint is enforced using mono.con from
the same package. The lower_bound argument is only used on the rare
occasions when the fitting function becomes negative or arbitrarily close to
zero. If this does occur lower_bound is added everywhere to ensure
that no one length is given essentially infinite weighting.
References
Package mgcv. In particular this function is a
modification of an example given in the man page for pcls.
Author
Matthew D. Young myoung@wehi.edu.au.
