Perform inverse weighted least squares regression
9 次查看(过去 30 天)
显示 更早的评论
I have a dataset for a calibration curve that is linear, but due to the nature of regular least squares regression, the regression line is far less accurate at the lower end of the curve. This is due to the fact that linear regression minimizes the sum of squares of absolute error.
To get a more accurate fit at the lower end of my dataset, it has been reccomended to use an "Inverse Weighted Linear" regression. This is performed by minimizing the sum of squares of (1/error). In theory this makes perfect sense, the regression will fit much better at the lower end of the dataset, which is what I need.
However, I have not been able to find a tool that can do this, nor have I figured out how to do it by hand. When I search weighted linear, the results imply that I should know the weight of each datapoint. Would this be 1/error of each point?
0 个评论
采纳的回答
Star Strider
2021-5-16
‘Would this be 1/error of each point?’
That would appear to be a reasonable approach, since the data with the smallest errors would get large weights, and the data with large errors would get smaller weights.
There are several linear and nonlilnear parameter estimation techniques that do this automatically, for example nlinfit and specifically the section on Nonlinear Regression Using Observation Weights.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!