Re: [R] Constrained cubic smoothing spline

2013-03-05 Thread Simon Wood
Victor, It's a bit clunky, but you can use the 'pcls' function in package 'mgcv' for this, by adapting the examples in the help file. The examples themselves deal with inequality constraints imposing monotonicity, but 'pcls' also allows you to impose equality constraints. The examples are bas

[R] Constrained cubic smoothing spline

2013-03-05 Thread Victor hyk
Hello everone,    Anyone who knows how to force a cubic smoothing spline to pass through a particular point?    I found on website  someone said that we can use "cobs package" to force the spline pass through certain points or impose shape   constraints (increasing, decre