Perform inverse weighted least squares regression
10 views (last 30 days)
Show older comments
Aaron Goodman
on 16 May 2021
Commented: Star Strider
on 16 May 2021
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 Comments
Accepted Answer
Star Strider
on 16 May 2021
‘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.
More Answers (0)
See Also
Categories
Find more on Regression 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!