Lower and upper bound constrained least squares {cols}R Documentation

Constrained least squares

Description

Lower and upper bound constrained least squares

Usage

int.cls(y, x, lb, ub)
int.mcls(y, x, lb, ub)

Arguments

y

The response variable. For the int.cls() a numerical vector with observations, but for the int.mcls() a numerical matrix .

x

A matrix with independent variables, the design matrix.

lb

A vector or a single value with the lower bound(s) in the coefficients.

ub

A vector or a single value with the upper bound(s) in the coefficients.

Details

This function performs least squares under the constraint that the beta coefficients lie within interval(s), i.e. min \sum_{i=1}^n(y_i-\bm{x}_i^\top\bm{\beta})^2 such that lb_j\leq \beta_j \leq ub_j.

Value

A list including:

be

A numerical matrix with the constrained beta coefficients.

mse

A numerical vector with the mean squared error.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

See Also

pls

Examples

x <- as.matrix( iris[1:50, 1:4] )
y <- rnorm(50)
int.cls(y, x, -0.2, 0.2)

[Package cols version 1.5 Index]