[R] Questions about piecewise spline fitting

Jonathan Baron baron at cattell.psych.upenn.edu
Thu Dec 6 16:09:33 CET 2001


Another approach to this problem - probably not as good as those
already proposed - is to use nls, for example,

nls(st1~pmin(A,A+B-C*wc),start=list(A=.5,B=1.5,C=.0020))

This was something I did for a data set with a flat initial
segment followed by a rougly linear decline.  The dependent
measure was st1 and the predictor was wc.  It was hard to find
the right starting list, though.  An advantage of this is that
it finds the knot by itself.

Jon Baron


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list