Re: [R] Optimal knot locations for splines

2008-05-03 Thread Spencer Graves
Hi, Mike: Thanks for the bug report. Attached please find a version of 'curfit.free.knot' that will now fit splines of degree other than 3. This will appear in the next official release of DierckxSpline. Until then, you can use the attached. (It still has known bugs, but with luck th

Re: [R] Optimal knot locations for splines

2008-05-02 Thread Dieter Menne
Mike Dugas gmail.com> writes: > > Thanks for the help. I tried out the one promising lead, curfit.free.knot, > and it doesn't work for linear or quadratic splines. The documentation says > it should, but when I specify a linear spline, it returns a cubic. Could you demonstrate this with a sel

Re: [R] Optimal knot locations for splines

2008-05-01 Thread Mike Dugas
Thanks for the help. I tried out the one promising lead, curfit.free.knot, and it doesn't work for linear or quadratic splines. The documentation says it should, but when I specify a linear spline, it returns a cubic. On 5/1/08, Spencer Graves <[EMAIL PROTECTED]> wrote: > > RSiteSearch('fr

Re: [R] Optimal knot locations for splines

2008-05-01 Thread Spencer Graves
RSiteSearch('free knot splines', 'fun') produced 5 hits, the first of which is curfit.free.knot {DierckxSpline}. RSiteSearch('estimate knots', 'fun') produced 54 hits, but I don't know if any of those would help you. Spencer Graves Mike Dugas wrote: Suppose I have two variab

[R] Optimal knot locations for splines

2008-05-01 Thread Mike Dugas
Suppose I have two variables, x and y. For a fixed number of knots, I want to create a spline transformation of x such that a loss function is minimized. Presumably, this loss function would be least squares, i.e. sum (f(x)-y)^2. The spline transformations would be linear, quadratic or cubic. I