constructFormula {BIGL}R Documentation

Construct a model formula from parameter constraint matrix

Description

For parameter names defined in naming vector, formula is constructed so that consMatrix %*% naming = consVector is satisfied. Constraint coefficients are normalized and convert into fractions.

Usage

constructFormula(
  consMatrix = NULL,
  consVector = NULL,
  naming = c("h1", "h2", "b", "m1", "m2", "e1", "e2"),
  extraVars = c("d1", "d2"),
  formulaArgs = c("effect", "fn")
)

Arguments

consMatrix

Constraint matrix

consVector

Constraint vector

naming

Parameter names

extraVars

Non-parameter variables used in the formula and function evaluation. These will be appended to the formula.

formulaArgs

Character vector of length two. First element indicates name for the response variable. Second element indicates name of the function.

Value

This function returns a model construct appropriate for fitMarginals function. It also separates variables into those that are free and those which are constrained.

Examples

  constM <- rbind(c(0, 0, 1, 0, 0, 0, 0),
                  c(0, 0, 0, -1, 1, 0, 0))
  constV <- c(0.9, 0)
  constructFormula(constM, constV)

[Package BIGL version 1.9.2 Index]