- #1
vibe3
- 46
- 1
Hello,
When doing a weighted least squares fit of a model to data, I want to examine the residuals to see if their histogram matches the expected probability distribution. Since I am minimizing
[tex]
\chi^2 = \sum_i w_i \left[ y_i - Y(x_i) \right]^2
[/tex]
would I define my (normalized/studentized) residuals as
[tex]
r_i = \frac{\sqrt{w_i} ( y_i - Y(x_i) )}{\sigma \sqrt{1 - h_i}}
[/tex]
or in the usual way as
[tex]
r_i = \frac{y_i - Y(x_i)}{\sigma \sqrt{1 - h_i}}
[/tex]
where [itex]h_i[/itex] are the statistical leverages and [itex]\sigma[/itex] is the residual standard deviation. I am using a robust (iterative) least squares procedure to determine the weights [itex]w_i[/itex] in order to detect and eliminate outliers, so the residual histogram should match the expected distribution of the M-estimator function I'm using (Huber in my case).
When doing a weighted least squares fit of a model to data, I want to examine the residuals to see if their histogram matches the expected probability distribution. Since I am minimizing
[tex]
\chi^2 = \sum_i w_i \left[ y_i - Y(x_i) \right]^2
[/tex]
would I define my (normalized/studentized) residuals as
[tex]
r_i = \frac{\sqrt{w_i} ( y_i - Y(x_i) )}{\sigma \sqrt{1 - h_i}}
[/tex]
or in the usual way as
[tex]
r_i = \frac{y_i - Y(x_i)}{\sigma \sqrt{1 - h_i}}
[/tex]
where [itex]h_i[/itex] are the statistical leverages and [itex]\sigma[/itex] is the residual standard deviation. I am using a robust (iterative) least squares procedure to determine the weights [itex]w_i[/itex] in order to detect and eliminate outliers, so the residual histogram should match the expected distribution of the M-estimator function I'm using (Huber in my case).