Learn R Programming

mcmcsae (version 0.7.9)

set_constraints: Set up a system of linear equality and/or inequality constraints

Description

Two-sided inequalities specified by S2, l2, u2 are currently transformed into the one-sided form \(S'x >= s\), combined with any directly specified constraints of this form. Some basic consistency checks are carried out, notably regarding the dimensions of the inputs.

Usage

set_constraints(
  R = NULL,
  r = NULL,
  S = NULL,
  s = NULL,
  S2 = NULL,
  l2 = NULL,
  u2 = NULL,
  scale = FALSE
)

Value

An environment with constraint matrices and vectors and a method to check whether a numeric vector satisfies all constraints. Returns NULL in case of no constraints.

Arguments

R

equality constraint matrix each column of which corresponds to a constraint.

r

right-hand side vector for equality constraints \(R'x = r\), where \(R'\) denotes the transpose of R.

S

inequality constraint matrix each column of which corresponds to an inequality constraint.

s

rhs vector for inequality constraints \(S'x >= s\), where \(S'\) denotes the transpose of S.

S2

inequality constraint matrix each column of which corresponds to a two-sided inequality constraint.

l2

vector of lower bounds for two-sided inequality constraints \(l_2 <= S_2'x <= u_2\).

u2

vector of upper bounds for two-sided inequality constraints \(l_2 <= S_2'x <= u_2\).

scale

whether to scale the columns of all constraint matrices to unit Euclidean norm.