Description Usage Arguments Details Value Author(s)
Parses a character string describing a set of informative hypotheses, and returns Replication (in)equality constraint matrices
1 | create_matrices(varnames, hyp)
|
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 Replication hypothesis (see Details). |
Informative hypotheses specified as a character string by "hyp" should adhere to the following simple syntax:
The hypothesis consists of a (series of) (in)equality constraint(s). Every single (in)equality constraint is of the form "R1*mu1 + R2*mu2+... = 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, "R1*mu1 = R2*mu2" is equivalent to "R1*mu1 - R2*mu2 = 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.
A pair of named matrices for every hypothesis specified in the
hyp
argument; one matrix named R, specifying (in)equality constraints,
and, a vector called r with constants, and a value E specifying the number of equality constraints.
Caspar van Lissa, modified for the Replication package by M.A.J. Zondervan-Zwijnenburg
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.