Question: How to determine initial values for NonlinearFit?

For the NonlinearFit function in the Statistics package, how can I determine initial values that will allow it to solve and not diverge in this case: NonlinearFit((p1*x^2 + p2*x + p3)/(q1*x + x^2 + q2), Ycg, Sx, x) returns with:

"Warning, limiting number of iterations reached" and displays the coefficient values when it gave up. Clearly they were diverging and it was never going to find a solution. Here are values it stopped with:

[p1=583621.008503822, p2 = 59223.7407763244, p3 = 92888.8332296935, q1 =6192.35371505405, q2 = 230.127618843129]

If I give it good guesses, it finds the solution:

iv := [p1 = 494.8, p2 = -156, p3 = 12.45, q1 = -0.2884, q2 = 0.02548];
NonlinearFit((p1*x^2 + p2*x + p3)/(q1*x + x^2 + q2), Ycg, Sx, x, initialvalues = iv);

[p1=494.772354721411,p2=-155.993031307792, p3 = 12.4504112058999, q1 = -0.288444965762112, q2 = 0.0254838840984013]

The problem is, I got the initial values from the MATLAB Curve Fitting Toolbox. I would like be to use Maple alone and not need MATLAB for cure fitting. How can I compute initial values that will allow Maple to find a solution?

Please Wait...