Hi,
I would like to have some advices about how to fit such function:
f(x) = a.x^b if x <= t
c.x - c.t + a.t^b otherwise
I have to minimize the least-squares error knowing x and f(x).
Do you have any propositions of what should I use to achieve it ?
Thanks a lot !
Eric
Propositions to fit a 2 pieces function
2 messages · Eric Rodriguez, Uwe Ligges
Eric Rodriguez wrote:
Hi,
I would like to have some advices about how to fit such function:
f(x) = a.x^b if x <= t
c.x - c.t + a.t^b otherwise
I have to minimize the least-squares error knowing x and f(x).
Do you have any propositions of what should I use to achieve it ?
That's what ifelse() has been invented for. Are you going to apply Nelder_Mead, BFGS or what? BFGS might be very problematic in this case (untested) ... Uwe Ligges
Thanks a lot ! Eric
______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html