MonotoneRegression: Weighted Isotonic Regression (Weighted Monotone Regression)

View source: R/MonotoneRegression.R

MonotoneRegressionR Documentation

Weighted Isotonic Regression (Weighted Monotone Regression)

Description

Performs weighted isotonic (monotone) regression using the non-negative weights in w. The function is a direct translation of the matlab function lsqisotonic.

Usage

MonotoneRegression(x, y, w = NULL)

Arguments

x

The independent variable vector

y

The dependent variable vector

w

A vector of weigths

Details

YHAT = MonotoneRegression(X,Y) returns a vector of values that minimize the sum of squares (Y - YHAT).^2 under the monotonicity constraint that X(I) > X(J) => YHAT(I) >= YHAT(J), i.e., the values in YHAT are monotonically non-decreasing with respect to X (sometimes referred to as "weak monotonicity"). LSQISOTONIC uses the "pool adjacent violators" algorithm.

If X(I) == X(J), then YHAT(I) may be <, ==, or > YHAT(J) (sometimes referred to as the "primary approach"). If ties do occur in X, a plot of YHAT vs. X may appear to be non-monotonic at those points. In fact, the above monotonicity constraint is not violated, and a reordering within each group of ties, by ascending YHAT, will produce the desired appearance in the plot.

Value

The fitted values after the monotone regression

Note

The function is a direct translation of the matlab function lsqisotonic.

Author(s)

Jose L. Vicente Villardon (from a matlab functiom)

References

Kruskal, J.B. (1964) "Nonmetric multidimensional scaling: a numerical method", Psychometrika 29:115-129.

Cox, R.F. and Cox, M.A.A. (1994) Multidimensional Scaling, Chapman&Hall.

Examples

## Used inside MDS


MultBiplotR documentation built on Nov. 21, 2023, 5:08 p.m.