The weighted least squares regression performs an ordinary least
squares regression after applying a user-specified weighting
to the data.
Usage
After selecting Weighted
Least Squares... from the Regress Menu, the user will be
presented with the window above. The user can then select the
independent and dependent variables. Furthermore, the variable
acting as the weighting for the regression may also be selected.
Once all applicable selections are made, the regression may
be run by selecting Compute
Regression... from the Regression Menu. The
results will appear as soon as calculations complete.
Options
The user may select to override matrix conditioning
checks during the
regression in the options dialog. The options dialog is
accessed by selecting Options...
from the Regression Menu.
Output
Once the regression is complete, the user will be presented with
results similar to the following:
If the regression fails for some reason, the failure message will be
displayed in the results window rather than results.
Method
The weighted least squares regression is implemented in pure JRuby
using the Draco Plugin System.
The regression solves the following system:
The weighting matrix, W,
is composed of a purely diagonal matrix with the values of the
weighting vector along the diagonal. The system is solved
using the JLMatrix inverse method.
Because weighted least squares is implemented as a plugin, the source code is available in the scripts/ruby/plugin directory.