Should precise values count more? (weighted regression, precision weights)
In brief
Should more precise values count more? Weighted regression (precision weights) gives precise values more weight. It fits when the target is a number and the values differ in precision, such as means from groups of different sizes.
How it works in Statable
- "New analysis", then choose the card "Can something be predicted?".
- Choose the target column and the predictor columns.
- "More options" → "Model" → "Linear with precision weights", then choose the column with the weights.
- A weight of 0 leaves the row out; a negative or missing weight blocks the calculation.
Not the same as the case weight
Frequency weights (case weight) count cases and change n. Precision weights say how exact a value is; they do not count cases. n stays the number of rows with a weight above 0. Both at the same time is not possible; Statable says so in a sentence.
What the table looks like
One row per case, a target column with numbers, predictor columns and a column with the weights. A weight of 0 leaves the row out; the number is shown in the result. A negative or missing weight blocks the calculation.
Reading the result
- The coefficients b with SE, t, p and the 95% interval read as in linear regression; the interval uses the t distribution with the degrees of freedom given.
- R² is weighted and not comparable with the unweighted R². The residual standard deviation σ, the F test of the model and the smallest and largest weight are also shown.
Trap: weights from the same data
The weights must come from knowledge about the measurement precision (for example from the group size or a known spread). Weights that are estimated from the residuals of the same data make the standard errors too small.
Requirements and limits
- The other requirements of linear regression still apply (straight relationship, independent cases, residuals without strong outliers).
- Rows with a gap are not included; the number is shown in the result.
Reporting the result
weighted, R² = .70, F(1, 48) = 110.7, p < .001
Typical examples
- Means from classes of very different sizes as the target, weighted by class size.
- Measurements with known, different precision from several devices.
For specialists
R (stats): lm(y ~ x, weights = w). A weight of 0 drops out, the degrees of freedom count only rows with w > 0. Checked on cars with w = 1/speed, also with two zero weights, against SPSS.