constructFormula {BIGL} | R Documentation |
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.
constructFormula(
consMatrix = NULL,
consVector = NULL,
naming = c("h1", "h2", "b", "m1", "m2", "e1", "e2"),
extraVars = c("d1", "d2"),
formulaArgs = c("effect", "fn")
)
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. |
This function returns a model construct appropriate for
fitMarginals
function. It also separates variables into those
that are free and those which are constrained.
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)