Nonlinear Regression with Errors in X and Y
8 次查看(过去 30 天)
显示 更早的评论
I am dealing a series of data point X and Y, their relation is nonlinear, how can i do a nonlinear regression to obtain the fitted curve: Y=a*X^2+b*X+c? I am especially interested in the uncertainty of the quadratic coefficient: "a", i have found some programs but they only consider the error in Y without including the errors in X. Are there any way to determine the uncertainty of "a" considering errors in both X and Y?
Mike
0 个评论
回答(3 个)
Safwan
2012-3-22
What do you mean with the errors in X. Anyway, when you plot your data you can go to Tools->Basic fitting (in the figure) and fit your data with quadratic curve. Otherwise if you have the Curve fitting Toolbox of Matlab then you can use more functions. Last suggusted option from me, you can use the fminsearch.m function of matlab to find the value of a.
Sean de Wolski
2012-3-22
That looks like a multiple linear regression to me.
doc polyfit
2 个评论
Safwan
2012-3-22
Hi Sean, i have a question for you. Have you ever tried to convert a polyfit block (Simulink) into C code by the embedded coder?
Tom Lane
2012-3-23
编辑:Tom Lane
2017-12-15
If you just had y and one or more x variables as predictors, there is information about an errors-in-variables fit here:
If you applied this literally to your example, you'd have to imagine that x and x^2 had separate errors. There is a file exchange submission that appears to address this, but I haven't played around with it:
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Least Squares 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!