
Last chance! 50% off unlimited learning
Sale ends in
Parameter transformation
Pexpl(
trafo,
parameters = NULL,
attach.input = FALSE,
condition = NULL,
compile = FALSE,
modelname = NULL,
verbose = FALSE
)
Named character vector. Names correspond to the parameters being fed into the model (the inner parameters). The elements of tafo are equations that express the inner parameters in terms of other parameters (the outer parameters)
Character vector. Optional. If given, the generated parameter
transformation returns values for each element in parameters
. If elements of
parameters
are not in names(trafo)
the identity transformation is assumed.
attach those incoming parameters to output which are not overwritten by the parameter transformation.
character, the condition for which the transformation is generated
Logical, compile the function (see funC0)
Character, used if compile = TRUE
, sets a fixed filename for the
C file.
Print compiler output to R command line.
a function p2p(p, fixed = NULL, deriv = TRUE)
representing the parameter
transformation. Here, p
is a named numeric vector with the values of the outer parameters,
fixed
is a named numeric vector with values of the outer parameters being considered
as fixed (no derivatives returned) and deriv
is a logical determining whether the Jacobian
of the parameter transformation is returned as attribute "deriv".
Pimpl for implicit parameter transformations
# NOT RUN {
logtrafo <- c(k1 = "exp(logk1)", k2 = "exp(logk2)",
A = "exp(logA)", B = "exp(logB)")
p_log <- P(logtrafo)
pars <- c(logk1 = 1, logk2 = -1, logA = 0, logB = 0)
out <- p_log(pars)
getDerivs(out)
# }
Run the code above in your browser using DataLab