Learn R Programming

goric (version 1.1-2)

constrSet: Generate Constraint Sets

Description

Generate sets of constraint matrices (constr), right hand side elements, and numbers of equality constraints (nec) with a predefined structure

Usage

constrSet(n, set = c("sequence", "seqcontrol", "lplateau", "uplateau",
  "downturn", "williams"), direction = c("increase", "decrease"), base = 1)

Arguments

n

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

set

character string defining the type of constraints; one of "sequence", "seqcontrol", "lplateau", "uplateau", or "downturn"

direction

direction of the inequality constraints, either "increase" or "decrease"

base

column of the constraint matrix representing a control group

Value

a list with slots constr, rhs, and nec for each constraint definition

See Also

orlm, constrMat

Examples

Run this code
# NOT RUN {
n <- c(10,20,30,40)
constrSet(n, set="sequence")
constrSet(n, set="seqcontrol")
constrSet(n, set="lplateau")
constrSet(n, set="uplateau")
constrSet(n, set="downturn")
constrSet(n, set="williams")
# }

Run the code above in your browser using DataLab