|
isotone |
|
Weighted Least Squares Monotone Regression |
DESCRIPTION
Given a vector of data and a vector of weights, find the monotone
sequence closest to the data in the sense of weighted least squares with the
given weights.
USAGE
ghat = isotone(y,w,increasing);
REQUIRED ARGUMENTS
| x | a vector of data |
OPTIONAL ARGUMENTS
| increasing |
logical variable (0 or
1) indicating whether the required fit is to be increasing or decreasing |
| a |
VALUE
The vector giving
the best fitting monotone sequence is returned.
NOTE
This script is based on the IsoMeans.m procedure by Lutz Duembgen.
BACKGROUND
If increasing=0, the original sequence is negated and the resulting estimate negated. The standard pool-adjacent-violators algorithm is used. Maximal decreasing subsequences are found within the current sequence. Each such decreasing subsequence is replaced by a constant sequence with value equal to the weighted average. Within the algorithm, the subsequence is replaced by a single point, with weight the sum of the weights within the subsequence. This process is iterated to termination. The resulting sequence is then unpacked back to the original ordering to give the weighted least squares monotone fit.
SEE ALSO