Learn R Programming

goric (version 1.1-2)

constrMat: Generate Constraint Matrices

Description

Generate a constraint matrix with a predefined structure

Usage

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

See Also

orlm, constrSet

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab