repar {dMod} | R Documentation |
Reparameterization
Description
Reparameterization
Usage
repar(expr, trafo = NULL, ..., reset = FALSE)
Arguments
expr |
character of the form |
trafo |
character or equation vector or list thereof. The object where the replacement takes place in |
... |
pass symbols as named arguments |
reset |
logical. If true, the trafo element corresponding to lhs is reset according to rhs. If false, lhs wherever it occurs in the rhs of trafo is replaced by rhs of the formula. |
Details
Left and right-hand side of expr
are searched for symbols. If separated by
"_", symbols are recognized as such, e.g. in Delta_x
where the symbols are
"Delta" and "x". Each symbol for which values (character or numbers) are passed by the
...
argument is replaced.
Value
an equation vector with the reparameterization.
Examples
innerpars <- letters[1:3]
constraints <- c(a = "b + c")
mycondition <- "cond1"
trafo <- repar("x ~ x", x = innerpars)
trafo <- repar("x ~ y", trafo, x = names(constraints), y = constraints)
trafo <- repar("x ~ exp(x)", trafo, x = innerpars)
trafo <- repar("x ~ x + Delta_x_condition", trafo, x = innerpars, condition = mycondition)