constrMat: Generate Constraint Matrices

Description Usage Arguments Value Author(s) See Also Examples

View source: R/set_functions.r

Description

Generate a constraint matrix with a predefined structure

Usage

1
2
3
constrMat(n, type=c("monotone","control","average",
                    "laverage","uaverage","caverage"),
          base=1)

Arguments

n

a (possibly named) vector of sample sizes for each group

type

character string defining the type of constraints; one of "monotone", "control","average","laverage","uaverage", or "caverage"

base

column of the constraint matrix representing a control group (when type = "control")

Value

a constraint matrix

Author(s)

Daniel Gerhard and Rebecca M. Kuiper

See Also

orlm, constrSet

Examples

1
2
3
4
5
6
7
n <- c(10,20,30,40)
constrMat(n, type="monotone")
constrMat(n, type="control", base=2)
constrMat(n, type="average")
constrMat(n, type="laverage")
constrMat(n, type="uaverage")
constrMat(n, type="caverage", base=2)


goric documentation built on May 20, 2017, 12:51 a.m.
Search within the goric package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.