Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hello,
I'm using the function multidfit to generate a regression model for a set of 3 independed and 1 depended variable.
The function needs a vector with guess values to calculate coefficients.
With a new set of data the function could no longer converge with a guess vector filled with zero's.
I never know which values i would have to guess but is there a way to cleverly itterate through the guess vector and always come up with a solution?
I don't have a method, but if someone does, I want to invest in it...it should be worth a bundle of money. Nonlinear optimization problems are all different, so there should be no method that "always" works. However, there are ways to improve the "odds". Try scaling the problem so all of the independent variables are of the same order of magnitude. This of course assumes you have some idea of the answer, just not a very precise answer. You can also try normalizing the independent variables (parameters) about the expected result and with an expected range. Thus, initial guesses would be like, 0, +- 0.5 and +- 1 for these normalized parameters.