create_matrices function

Create (in)equality constraint matrices

Create (in)equality constraint matrices

Parses a character string describing a set of informative hypotheses, and returns (in)equality constraint matrices

create_matrices(varnames, hyp)

Arguments

  • varnames: A character (vector of characters), containing names of variables used in the hypotheses.

    which the model parameters are extracted.

  • hyp: A character string, containing a hypothesis (see Details).

Returns

A pair of named matrices for every hypothesis specified in the hyp argument; one matrix named ERr, specifying equality constraints, and one matrix named IRr, specifying inequality constraints.

Details

Informative hypotheses specified as a character string by "hyp" should adhere to the following simple syntax:

  • Competing hypotheses are separated by ";". Thus, "a=b;a>b" means that H1: a=b, and H2: a>b.
  • Each individual hypothesis consists of a (series of) (in)equality constraint(s). Every single (in)equality constraint is of the form "R1mu1 + R2mu2+... = r", where capital Rs refer to numeric scaling constants, must refer to the names of parameters in the model, and the lower case r refers to a constant. Standard mathematical simplification rules apply; thus, "R1mu1 = R2mu2" is equivalent to "R1mu1 - R2mu2 = 0".
  • Multiple unrelated constraints within one hypothesis can be chained by "&". Thus, "a=b&c=d" means that H1: a=b AND c=d.
  • Multiple related constraints within one hypothesis can be chained by repeating the (in)equality operators "=", "<", or ">". Thus, "a<b<c" means that H1: a < b AND b < c.
  • Parameters can be grouped by placing them in a parenthesized, comma separated list. Thus, "(a,b)>c" means that H1: a > c AND b > c. Similarly, "(a,b)>(c,d)" means that H1: a > c AND b > c AND b > c AND b > d.

Author(s)

Caspar van Lissa

  • Maintainer: Caspar J van Lissa
  • License: GPL (>= 3)
  • Last published: 2024-06-12