unimat {uniReg}R Documentation

Create the matrix of unimodality constraints.

Description

Returns a matrix C that can be used to specify linear constraints C b \ge 0 to impose unimodality with mode at the m-th element on a numeric vector b of length p.

Usage

unimat(p, m)

Arguments

p

Integer (>=2) giving the length of the vector b.

m

Location of the mode within the vector b. Should be in integer between 1 and p.

Value

Matrix C with coefficients for the linear constraints.

Author(s)

Claudia Koellmann

See Also

equiknots, unireg

Examples

unimat(4,2)
unimat(5,3)

[Package uniReg version 1.1 Index]