Weighted Least Squares fit
8 views (last 30 days)
Show older comments
Hello Friends,
The weights in Weighted Least squares are traditionally assumed as inverse of variance. But for example if my data is made of two parts. My question is instead of inverse of variance, can I use any value for weight. For example for the first part of data, when I use w1=10 and for second part of data the weight w2=1 I can see visually that the fit is good and i want to use this.
When I use w1=5 and w2=1 the fit is not so great.
So does the fact that I'm not using the variance as estimates of weights make a difference to my results. Is it a rule that weights have to be known. Can you judge the fit visually and make adjustments to weights randomly.
Thank you.
0 Comments
Accepted Answer
Andrew Newell
on 30 Apr 2011
You can certainly make visual adjustments to the weights to get a better fit - but what would the fit mean? I am assuming that there is some purpose to fitting the data besides making a nice plot.
When you're doing least squares fits, you're fitting the data to some statistical model. The most common model is that the errors in your measurements are independent and have equal variance. If they don't have equal variance, then you use weighted least squares. If you don't know the variances, there are methods for estimating them. See this earlier discussion.
0 Comments
More Answers (1)
See Also
Categories
Find more on Linear and Nonlinear 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!