unimat: Create the matrix of unimodality constraints.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/unimat.R

Description

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

Usage

1
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

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

uniReg documentation built on May 29, 2017, 8:30 p.m.