Nonlinear regressions alternatives to nlinfit
Show older comments
Hi,
What are the available alternatives to 'nlinfit' in Matlab ? Is there a ridge type of regressions to be used for non-linear model ?
I am not satisfied with the nlinfit since, is very sensitive to the initial conditions given and in my case cannot make an educated guess on those. So, I am wondering where there are other nonlinear regression options in matlab suited for non-linear models.
UPDATE
I have an algorithm where the sample for y (dependent variable) and the sample for x's (explanatory variables) of the regression are generated from a particular economic model.
Now to solve my model, I have a loop where my data are generated. So in each loop I have a new sample and therefore a new regression. I use the nlinfit for those regressions, where in each iteration I use as initial guesses the coefficients found by the regression in the PREVIOUS iteration.
So it very easy now to understand where my algorithm crashes. There are instances where in a particular iteration step the initial guesses might be so bad making the nlinfit to crash (for example problems with the Jacobian)
Many thanks
Accepted Answer
More Answers (1)
John D'Errico
on 17 Apr 2015
0 votes
There is no magic wand that works perfectly. If there was, it would be in use. What a surprise!
While you CAN create a simple ridge type estimator for a nonlinear problem, they just bias the result towards zero. As arbitrarily, you could use it to bias the result towards any number you want, but if you already know the answer, then why bother to estimate it? At least if you know the answer, then you have good starting values for it, and if the estimation process drives away from there, then it means you have crap for data.
So get better starting values. Or get better data. Or use a model that actually fits your data, instead of trying to force some arbitrary model to your data.
In the end, I can't give you better advice without seeing your data, without seeing your model. I'd need to understand why it was that you chose the model you are trying to use. For example, it might be that you should be using a spline instead. Or maybe a partitioned least squares might be appropriate. But to just ask for other methods without knowing anything more would mean I need to write a book here. I'd be wasting my time to describe methods that are totally useless for you.
Categories
Find more on Linear Predictive Coding in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!