Package 'OrdMonReg'

Title: Compute least squares estimates of one bounded or two ordered isotonic regression curves
Description: We consider the problem of estimating two isotonic regression curves g1* and g2* under the constraint that they are ordered, i.e. g1* <= g2*. Given two sets of n data points y_1, ..., y_n and z_1, ..., z_n that are observed at (the same) deterministic design points x_1, ..., x_n, the estimates are obtained by minimizing the Least Squares criterion L(a, b) = sum_{i=1}^n (y_i - a_i)^2 w1(x_i) + sum_{i=1}^n (z_i - b_i)^2 w2(x_i) over the class of pairs of vectors (a, b) such that a and b are isotonic and a_i <= b_i for all i = 1, ..., n. We offer two different approaches to compute the estimates: a projected subgradient algorithm where the projection is calculated using a PAVA as well as Dykstra's cyclical projection algorithm.
Authors: Fadoua Balabdaoui, Kaspar Rufibach, Filippo Santambrogio
Maintainer: Kaspar Rufibach <[email protected]>
License: GPL (>= 2)
Version: 1.0.3
Built: 2025-01-22 04:56:00 UTC
Source: https://github.com/cran/OrdMonReg

Help Index


Compute least squares estimates of one bounded or two ordered antitonic regression curves

Description

We consider the problem of estimating two isotonic regression curves g1g^\circ_1 and g2g^\circ_2 under the constraint that g1g2g^\circ_1 \le g^\circ_2. Given two sets of nn data points y1,,yny_1, \ldots, y_n and z1,,znz_1, \ldots, z_n that are observed at (the same) deterministic design points x1,,xnx_1, \ldots, x_n, the estimates are obtained by minimizing the Least Squares criterion

L(a,b)=i=1n(yiai)2w1(xi)+i=1n(zibi)2w2(xi)L(a, b) = \sum_{i=1}^n (y_i - a_i)^2 w_1(x_i) + \sum_{i=1}^n (z_i - b_i)^2 w_2(x_i)

over the class of pairs of vectors (a,b)(a, b) such that aa and bb are isotonic and aibia_i \le b_i for all i=1,,ni = {1, \ldots, n}. We offer two different approaches to compute the estimates: a projected subgradient algorithm where the projection is calculated using a pool-adjacent-violaters algorithm (PAVA) as well as Dykstra's cyclical projection algorithm..

Additionally, functions to solve the bounded isotonic regression problem described in Barlow et al. (1972, p. 57) are provided.

Details

Package: OrdMonReg
Type: Package
Version: 1.0.3
Date: 2011-11-30
License: GPL (>=2)

Author(s)

Fadoua Balabdaoui [email protected]
http://www.ceremade.dauphine.fr/~fadoua

Kaspar Rufibach (maintainer) [email protected]
http://www.kasparrufibach.ch

Filippo Santambrogio [email protected]
http://www.math.u-psud.fr/~santambr/

References

Balabdaoui, F., Rufibach, K., Santambrogio, F. (2009). Least squares estimation of two ordered monotone regression curves. Preprint.

Barlow, R. E., Bartholomew, D. J., Bremner, J. M., Brunk, H. D. (1972). Statistical inference under order restrictions. The theory and application of isotonic regression. John Wiley and Sons, London - New York - Sydney.

Dykstra, R.L. (1983). An Algorithm for Restricted Least Squares Regression. J. Amer. Statist. Assoc., 78, 837–842.

See Also

Other versions of bounded regression are implemented in the packages cir, Iso, monreg. The function BoundedIsoMean is a generalization of the function isoMean in the package logcondens.

Examples

## examples are provided in the help files of the main functions of this package:
?BoundedAntiMean
?BoundedAntiMeanTwo

Computes explicitly known values of the estimates in the two ordered functions antitonic regression problem

Description

These functions compute the values a1a_1^* and bnb_n^*, the value of the estimate of the upper function at x1x_1 and the value of the lower estimated function at xnx_n in the two ordered antitonic regression functions problem. These values can be computed via explicit formulas, unlike the values at xx2,,xn1x \in {x_2, \ldots, x_{n-1}}, which are received via a projected subgradient algorithm. However, bnb_n^* enters this algorithm as an auxiliary quantity.

Usage

astar_1(g1, w1, g2, w2)
bstar_n(g1, w1, g2, w2)

Arguments

g1

Vector in RnR^n, measurements of upper function.

w1

Vector in RnR^n, weights for upper function.

g2

Vector in RnR^n, measurements of lower function.

w2

Vector in RnR^n, weights for lower function.

Value

Values of a1a_1^* and bnb_n^* are returned.

Author(s)

Fadoua Balabdaoui [email protected]
http://www.ceremade.dauphine.fr/~fadoua

Kaspar Rufibach (maintainer) [email protected]
http://www.kasparrufibach.ch

Filippo Santambrogio [email protected]
http://www.math.u-psud.fr/~santambr/

References

Balabdaoui, F., Rufibach, K., Santambrogio, F. (2009). Least squares estimation of two ordered monotone regression curves. Preprint.

See Also

This function is used by BoundedAntiMeanTwo.


Compute least square estimate of an iso- or antitonic function, bounded below and above by fixed functions

Description

This function computes the bounded least squares isotonic regression estimate, where the bounds are two functions such that the estimate is above the lower and below the upper function. To find the solution, we use the pool-adjacent-violaters algorithm for a suitable set function M, as discussed in Balabdaoui et al. (2009). The problem was initially posed in Barlow et al. (1972), including a remark (on p. 57) that the PAVA can be used to solve it. However, a formal proof is not given in Barlow et al. (1972). A short note detailing this proof is available from the authors of Balabdaoui et al. (2009) on request.

Usage

BoundedIsoMean(y, w, a = NA, b = NA)
BoundedAntiMean(y, w, a = NA, b = NA)

Arguments

y

Vector in RnR^n of measurements.

w

Vector in RnR^n of weights.

a

Vector in RnR^n that gives lower bound.

b

Vector in RnR^n that gives upper bound.

Details

The bounded isotonic regression problem is given by: For x1xnx_1 \le \ldots \le x_n let yi,i=1,,ny_i, i = 1, \ldots, n be measurements of some quantity at the xix_i's, with true mean function g(x)g^\circ(x). The goal is to estimate gg^\circ using least squares, i.e. to minimize

L(a)=i=1nwi(yiai)2L(a) = \sum_{i=1}^n w_i(y_i - a_i)^2

over the class of vectors aa that are isotonic and satisfy

aL,iaiaU,i  for  all  i=1,,na_{L, i} \le a_i \le a_{U, i} \ \ \mathrm{for} \ \ \mathrm{all} \ \ i = 1, \ldots, n

and two fixed isotonic vectors aLa_L and aUa_U. This problem can be solved using a suitable modification of the pool-adjacent-violaters algorithm, see Barlow et al. (1972, p. 57) and Balabdaoui et al. (2009).

The function BoundedAntiMean solves the same problem for antitonic curves, by simply invoking BoundedIsoMean flipping some of the arguments.

Value

The bounded isotonic (antitonic) estimate (g^)i=1n(\hat g^\circ)_{i=1}^n.

Author(s)

Fadoua Balabdaoui [email protected]
http://www.ceremade.dauphine.fr/~fadoua

Kaspar Rufibach (maintainer) [email protected]
http://www.kasparrufibach.ch

Filippo Santambrogio [email protected]
http://www.math.u-psud.fr/~santambr/

References

Balabdaoui, F., Rufibach, K., Santambrogio, F. (2009). Least squares estimation of two ordered monotone regression curves. Preprint.

Barlow, R. E., Bartholomew, D. J., Bremner, J. M., Brunk, H. D. (1972). Statistical inference under order restrictions. The theory and application of isotonic regression. John Wiley and Sons, London - New York - Sydney.

See Also

The functions BoundedAntiMeanTwo and BoundedIsoMeanTwo for the problem of estimating two ordered antitonic (isotonic) regression functions. The function BoundedIsoMean depends on the function MA.

Examples

## --------------------------------------------------------
## generate data
## --------------------------------------------------------
set.seed(23041977)
n <- 35
x <- 1:n / n
f0 <- - 3 * x + 5
g0 <- 1 / (x + 0.5) ^ 2 + 1 
g <- g0 + 3 * rnorm(n)

## --------------------------------------------------------
## compute estimate
## --------------------------------------------------------
g_est <- BoundedAntiMean(g, w = rep(1 / n, n), a = -rep(Inf, n), b = f0)

## --------------------------------------------------------
## plot observations and estimate
## --------------------------------------------------------
par(mar = c(4.5, 4, 3, 0.5))
plot(0, 0, type = 'n', main = "Observations, upper bound and estimate 
    for bounded antitonic regression", xlim = c(0, max(x)), ylim = 
    range(c(f0, g)), xlab = expression(x), ylab = "observations and estimate")
points(x, g, col = 1)
lines(x, g0, col = 1, lwd = 2, lty = 2)
lines(x, f0, col = 2, lwd = 2, lty = 2)
lines(x, g_est, col = 3, lwd = 2)
legend("bottomleft", c("truth", "data", "upper bound", "estimate"), 
    lty = c(1, 0, 1, 1), lwd = c(2, 1, 2, 2), pch = c(NA, 1, NA, NA), 
    col = c(1, 1:3), bty = 'n')
    
## Not run: 
## --------------------------------------------------------
## 'BoundedIsoMean' is a generalization of 'isoMean' in the 
## package 'logcondens'
## --------------------------------------------------------
library(logcondens)
n <- 50
y <- sort(runif(n, 0, 1)) ^ 2 + rnorm(n, 0, 0.2)

isoMean(y, w = rep(1 / n, n))
BoundedIsoMean(y, w = rep(1 / n, n), a = -rep(Inf, n), b = rep(Inf, n))

## End(Not run)

Compute solution to the problem of two ordered isotonic or antitonic curves

Description

See details below.

Usage

BoundedIsoMeanTwo(g1, w1, g2, w2, K1 = 1000, K2 = 400, 
    delta = 10^(-4), errorPrec = 10, output = TRUE)
BoundedAntiMeanTwo(g1, w1, g2, w2, K1 = 1000, K2 = 400, 
    delta = 10^(-4), errorPrec = 10, output = TRUE)

Arguments

g1

Vector in RnR^n, measurements of upper function.

w1

Vector in RnR^n, weights for upper function.

g2

Vector in RnR^n, measurements of lower function.

w2

Vector in RnR^n, weights for lower function.

K1

Upper bound on number of iterations.

K2

Number of iterations where step length is changed from the inverse of the norm of the subgradient to a diminishing function of the norm of the subgradient.

delta

Upper bound on the error, defines stopping criterion.

errorPrec

Computation of stopping criterion is expensive. Therefore, the stopping criterion is only evaluated at every errorPrec-th iteration of the algorithm.

output

Should intermediate results be output?

Details

We consider the problem of estimating two isotonic (antitonic) regression curves g1g_1^\circ and g2g_2^\circ under the constraint that g1g2g_1^\circ \le g_2^\circ. Given two sets of nn data points y1,,yny_1, \ldots, y_n and z1,,znz_1, \ldots, z_n that are observed at (the same) deterministic design points x1,,xnx_1, \ldots, x_n with weights w1,iw_{1,i} and w2,iw_{2,i}, respectively, the estimates are obtained by minimizing the Least Squares criterion

L2(a,b)=i=1n(yiai)2w1,i+i=1n(zibi)2w2,iL_2(a, b) = \sum_{i=1}^n (y_i - a_i)^2 w_{1,i} + \sum_{i=1}^n (z_i - b_i)^2 w_{2,i}

over the class of pairs of vectors (a,b)(a, b) such that aa and bb are isotonic (antitonic) and aibia_i \le b_i for all i=1,,ni = {1, \ldots, n}. The estimates are computed with a projected subgradient algorithm where the projection is calculated using a suitable version of the pool-adjacent-violaters algorithm (PAVA).

The algorithm is implemented for antitonic curves in the function BoundedAntiMeanTwo. The function BoundedIsoMeanTwo solves the same problem for isotonic curves, by simply invoking BoundedAntiMeanTwo and suitably flipping some of the arguments.

Value

g1

The estimated function g^1\hat g_1^\circ.

g2

The estimated function g^2\hat g_2^\circ.

L

Value of the least squares criterion at the minimum.

error

Value of error.

k

Number of iterations performed.

tau

Step length at final iteration.

Author(s)

Fadoua Balabdaoui [email protected]
http://www.ceremade.dauphine.fr/~fadoua

Kaspar Rufibach (maintainer) [email protected]
http://www.kasparrufibach.ch

Filippo Santambrogio [email protected]
http://www.math.u-psud.fr/~santambr/

References

Balabdaoui, F., Rufibach, K., Santambrogio, F. (2009). Least squares estimation of two ordered monotone regression curves. Preprint.

See Also

The functions BoundedAntiMean and BoundedIsoMean for the problem of estimating one antitonic (isotonic) regression function bounded above and below by fixed functions. The function BoundedAntiMeanTwo depends on the functions BoundedAntiMean, bstar_n, LSfunctional, and Subgradient.

Examples

## ========================================================
## The first example uses simulated data
## For the analysis of the mechIng dataset see below
## ========================================================

## --------------------------------------------------------
## initialization
## --------------------------------------------------------
set.seed(23041977)
n <- 100
x <- 1:n
g1 <- 1 / x^2 + 2
g1 <- g1 + 3 * rnorm(n)
g2 <- 1 / log(x+3) + 2
g2 <- g2 + 4 * rnorm(n)
w1 <- runif(n)
w1 <- w1 / sum(w1)
w2 <- runif(n)
w2 <- w2 / sum(w2)

## --------------------------------------------------------
## compute estimates
## --------------------------------------------------------
shor <- BoundedAntiMeanTwo(g1, w1, g2, w2, errorPrec = 20, 
    delta = 10^(-10))
    
## corresponding isotonic problem
shor2 <- BoundedIsoMeanTwo(-g2, w2, -g1, w1, errorPrec = 20, 
    delta = 10^(-10))
    
## the following vectors are equal
shor$g1 - -shor2$g2    
shor$g2 - -shor2$g1
        
## --------------------------------------------------------
## for comparison, compute estimates via cyclical projection
## algorithm due to Dykstra (1983) (isotonic problem)
## --------------------------------------------------------
dykstra1 <- BoundedIsoMeanTwoDykstra(-g2, w2, -g1, w1, 
    delta = 10^(-10))

## the following vectors are equal
shor2$g1 - dykstra1$g1
shor2$g2 - dykstra1$g2

## --------------------------------------------------------
## Checking of solution
## --------------------------------------------------------
# This compares the first component of shor$g1 with a^*_1:
c(shor$g1[1], astar_1(g1, w1, g2, w2))

## --------------------------------------------------------
## plot original functions and estimates
## --------------------------------------------------------
par(mfrow = c(1, 1), mar = c(4.5, 4, 3, 0.5))
plot(x, g1, col = 2, main = "Original observations and estimates in problem 
two ordered antitonic regression functions", xlim = c(0, max(x)), ylim = 
range(c(shor$g1, shor$g2, g1, g2)), xlab = expression(x), 
ylab = "measurements and estimates")
points(x, g2, col = 3)
lines(x, shor$g1 + 0.01, col = 2, type = 's', lwd = 2)
lines(x, shor$g2 - 0.01, col = 3, type = 's', lwd = 2)
legend("bottomleft", c(expression("upper estimated function g"[1]*"*"), 
    expression("lower estimated function g"[2]*"*")), lty = 1, col = 2:3, 
    lwd = 2, bty = "n")


## ========================================================
## Analysis of the mechIng dataset
## ========================================================

## --------------------------------------------------------
## input data
## --------------------------------------------------------
data(mechIng)
x <- mechIng$x
n <- length(x)
g1 <- mechIng$g1
g2 <- mechIng$g2
w1 <- rep(1, n)
w2 <- w1

## --------------------------------------------------------
## compute unordered estimates
## --------------------------------------------------------
g1_pava <- BoundedIsoMean(y = g1, w = w1, a = NA, b = NA)
g2_pava <- BoundedIsoMean(y = g2, w = w2, a = NA, b = NA)

## --------------------------------------------------------
## compute estimates via cyclical projection algorithm due to
## Dysktra (1983)
## --------------------------------------------------------
dykstra1 <- BoundedIsoMeanTwoDykstra(g1, w1, g2, w2, 
    delta = 10^-10, output = TRUE)
    
## --------------------------------------------------------
## compute smoothed versions
## --------------------------------------------------------
g1_mon <- dykstra1$g1
g2_mon <- dykstra1$g2   

kernel <- function(x, X, h, Y){
    tmp <- dnorm((x - X) / h) 
    res <- sum(Y * tmp) / sum(tmp)
    return(res)
    }
h <- 0.1 * n^(-1/5)

g1_smooth <- rep(NA, n)
g2_smooth <- g1_smooth
for (i in 1:n){
    g1_smooth[i] <- kernel(x[i], X = x, h, g1_mon)
    g2_smooth[i] <- kernel(x[i], X = x, h, g2_mon)
}
            
## --------------------------------------------------------
## plot original functions and estimates
## --------------------------------------------------------
par(mfrow = c(2, 1), oma = c(0, 0, 2, 0), mar = c(4.5, 4, 2, 0.5), 
    cex.main = 0.8, las = 1) 

plot(0, 0, type = 'n', xlim = c(0, max(x)), ylim = 
    range(c(g1, g2, g1_mon, g2_mon)), xlab = "x", ylab = 
    "measurements and estimates", main = "ordered antitonic estimates")
points(x, g1, col = grey(0.3), pch = 20, cex = 0.8)
points(x, g2, col = grey(0.6), pch = 20, cex = 0.8)
lines(x, g1_mon + 0.1, col = 2, type = 's', lwd = 3)
lines(x, g2_mon - 0.1, col = 3, type = 's', lwd = 3)
legend(0.2, 10, c(expression("upper isotonic function g"[1]*"*"), 
    expression("lower isotonic function g"[2]*"*")), lty = 1, col = 2:3, 
    lwd = 3, bty = "n")

plot(0, 0, type = 'n', xlim = c(0, max(x)), ylim = 
    range(c(g1, g2, g1_mon, g2_mon)), xlab = "x", ylab = "measurements and 
    estimates", main = "smoothed ordered antitonic estimates")
points(x, g1, col = grey(0.3), pch = 20, cex = 0.8)
points(x, g2, col = grey(0.6), pch = 20, cex = 0.8)
lines(x, g1_smooth + 0.1, col = 2, type = 's', lwd = 3)
lines(x, g2_smooth - 0.1, col = 3, type = 's', lwd = 3)
legend(0.2, 10, c(expression("upper isotonic smoothed function "*tilde(g)[1]*"*"), 
    expression("lower isotonic smoothed function "*tilde(g)[2]*"*")), 
    lty = 1, col = 2:3, lwd = 3, bty = "n")

par(cex.main = 1)
title("Original observations and estimates in mechanical engineering example", 
    line = 0, outer = TRUE)

Compute solution to the problem of two ordered isotonic or antitonic curves

Description

See details below.

Usage

BoundedIsoMeanTwoDykstra(g1, w1, g2, w2, K1 = 1000, 
    delta = 10^(-8), output = TRUE)

Arguments

g1

Vector in RnR^n, measurements of upper function.

w1

Vector in RnR^n, weights for upper function.

g2

Vector in RnR^n, measurements of lower function.

w2

Vector in RnR^n, weights for lower function.

K1

Upper bound on number of iterations.

delta

Upper bound on the error, defines stopping criterion.

output

Should intermediate results be output?

Details

See BoundedIsoMeanTwo for a description of the problem. This function computes the estimates via Dykstra's (see Dykstra, 1983) cyclical projection algorithm.

The algorithm is implemented for isotonic curves.

Value

g1

The estimated function g^1\hat g_1^\circ.

g2

The estimated function g^2\hat g_2^\circ.

L

Value of the least squares criterion at the minimum.

error

Value of error (norm of difference two consecutive projections).

k

Number of iterations performed.

Warning

Note that we have chosen a very simply stopping criterion here, namely the algorithm stops if the norm of two consecutive projections is smaller than δ\delta. If nn is very small, it may happen that two consecutive projections are equal although LL is not yet minimal (note that this typically happens if g1 = g2). If that is the case, we suggest to set δ<0\delta < 0 and let the algorithm run a sufficient number of iterations (specified by K1) to verify that the least squares criterion value can not be decreased anymore.

Author(s)

Fadoua Balabdaoui [email protected]
http://www.ceremade.dauphine.fr/~fadoua

Kaspar Rufibach (maintainer) [email protected]
http://www.kasparrufibach.ch

Filippo Santambrogio [email protected]
http://www.math.u-psud.fr/~santambr/

References

Balabdaoui, F., Rufibach, K., Santambrogio, F. (2009). Least squares estimation of two ordered monotone regression curves. Preprint.

Dykstra, R.L. (1983). An Algorithm for Restricted Least Squares Regression. J. Amer. Statist. Assoc., 78, 837–842.

See Also

The functions BoundedAntiMean and BoundedIsoMean for the problem of estimating one antitonic (isotonic) regression function bounded above and below by fixed functions. The function BoundedAntiMeanTwoDykstra depends on the functions discussed in minK.

Examples

## examples are provided in the help file of the main function of this package:
?BoundedIsoMeanTwo

Function to display numbers in outputs

Description

Function that facilitates output of numbers


Compute least squares criterion for two ordered isotonic regression functions

Description

Computes the value of the least squares criterion in the problem of two ordered isotonic regression functions.

Usage

LSfunctional(f1, g1, w1, f2, g2, w2)

Arguments

f1

Vector in RnR^n, specifies values of upper function at which criterion should be evaluated.

g1

Vector in RnR^n, measurements of upper function.

w1

Vector in RnR^n, weights for upper function.

f2

Vector in RnR^n, specifies values of lower function at which criterion should be evaluated.

g2

Vector in RnR^n, measurements of lower function.

w2

Vector in RnR^n, weights for lower function.

Details

This function simply computes for the above vectors

L(f1,f2) = i=1nw1i(f1ig1i)2+i=1nw2i(f2ig2i)2.L(f1, f2) \ = \ \sum_{i=1}^n w1_i(f1_i - g1_i)^2 + \sum_{i=1}^n w2_i(f2_i - g2_i)^2.

Author(s)

Fadoua Balabdaoui [email protected]
http://www.ceremade.dauphine.fr/~fadoua

Kaspar Rufibach (maintainer) [email protected]
http://www.kasparrufibach.ch

Filippo Santambrogio [email protected]
http://www.math.u-psud.fr/~santambr/

References

Balabdaoui, F., Rufibach, K., Santambrogio, F. (2009). Least squares estimation of two ordered monotone regression curves. Preprint.

See Also

This function is used by BoundedAntiMeanTwo.


Compute bounded weighted average

Description

This function computes the bounded weighted mean for any subset of indices.

Usage

MA(g, w, A = NA, a, b)

Arguments

g

Vector in RnR^n of measurements.

w

Vector in RnR^n of weights.

A

Subset of 1:n, denoting the subsets of the above vectors to compute the average with.

a

Vector in RnR^n that gives lower bound.

b

Vector in RnR^n that gives upper bound.

Details

This function computes the bounded average

MA[A]=max{min{Av[A],minxAb(x)},maxxAa(x)},MA[A] = \max\{\min\{Av[A], \min_{x \in A} b(x)\}, \max_{x \in A} a(x)\},

see Balabdaoui et al. (2009) for details.

Value

The bounded weighted average is returned.

Author(s)

Fadoua Balabdaoui [email protected]
http://www.ceremade.dauphine.fr/~fadoua

Kaspar Rufibach (maintainer) [email protected]
http://www.kasparrufibach.ch

Filippo Santambrogio [email protected]
http://www.math.u-psud.fr/~santambr/

References

Balabdaoui, F., Rufibach, K., Santambrogio, F. (2009). Least squares estimation of two ordered monotone regression curves. Preprint.

See Also

This function is used by BoundedIsoMean.


Mechanical engineering dataset used to illustrate ordered isotonic regression

Description

Dataset that contains the data analyzed in Balabdaoui et al. (2009).

Usage

data(mechIng)

Format

A data frame with 1495 observations on the following 3 variables.

x

Location of measurements.

g1

Measurements of the upper isotonic curve.

g2

Measurements of the lower isotonic curve.

Details

In Balabdaoui et al. (2009), ordered isotonic regression is illustrated using stress-strain curves from dynamical material tests.

Source

The data was taken from Shim and Mohr (2009).

References

Balabdaoui, F., Rufibach, K., Santambrogio, F. (2009). Least squares estimation of two ordered monotone regression curves. Preprint.

Shim, J. and Mohr, D. (2009). Using split Hopkinson pressure bars to perform large strain compression tests on polyurea at low, intermediate and high strain rates. International Journal of Impact Engineering, 36(9), 1116–1127.

See Also

See the examples in BoundedIsoMeanTwo for the analysis of this data.


Compute projections on restriction cones in Dykstra's algorithm.

Description

Internal functions for Dykstra's algorithm to compute bounded monotone regression estimates.

Details

These functions are not intended to be called by the user.

  • minK1Compute projection of (a,b)(a, b) on the set {(a,b) : a\{(a, b) \ : \ a is increasing.}.

  • minK2Compute projection of (a,b)(a, b) on the set {(a,b) : b\{(a, b) \ : \ b is increasing.}.

  • minK3Compute projection of (a,b)(a, b) on the set {(a,b) : ab}\{(a, b) \ : \ a \le b\}.

Author(s)

Fadoua Balabdaoui [email protected]
http://www.ceremade.dauphine.fr/~fadoua

Kaspar Rufibach (maintainer) [email protected]
http://www.kasparrufibach.ch

Filippo Santambrogio [email protected]
http://www.math.u-psud.fr/~santambr/

References

Balabdaoui, F., Rufibach, K., Santambrogio, F. (2009). Least squares estimation of two ordered antitonic regression curves. Preprint.

Dykstra, R.L. (1983). An Algorithm for Restricted Least Squares Regression. J. Amer. Statist. Assoc., 78, 837–842.

See Also

This functions are used by BoundedIsoMeanTwoDykstra.


Computes a subgradient for the projected subgradient algorithm

Description

This function computes a subgradient of the function Ψ\Psi.

Usage

Subgradient(b, g1, w1, g2, w2, B, Gsi)

Arguments

b

Vector in Rn1R^{n-1} at which subgradient should be computed.

g1

Vector in RnR^n, measurements of upper function.

w1

Vector in RnR^n, weights for upper function.

g2

Vector in RnR^n, measurements of lower function.

w2

Vector in RnR^n, weights for lower function.

B

Value of bnb_n^*.

Gsi

Matrix in Rn×nR^{n \times n} that contains the quantities Gs,iG_{s, i} defined in Balabdaoui et al. (2009).

Value

The subgradient at bb.

Author(s)

Fadoua Balabdaoui [email protected]
http://www.ceremade.dauphine.fr/~fadoua

Kaspar Rufibach (maintainer) [email protected]
http://www.kasparrufibach.ch

Filippo Santambrogio [email protected]
http://www.math.u-psud.fr/~santambr/

References

Balabdaoui, F., Rufibach, K., Santambrogio, F. (2009). Least squares estimation of two ordered antitonic regression curves. Preprint.

See Also

This function is used by BoundedAntiMeanTwo.