parToMatricesFactory {graphicalExtremes} | R Documentation |
Factory: parToMatrices
Description
Creates a helper function to convert a parameter vector par
to a Gamma and/or Theta matrix.
Usage
parToMatricesFactory(
graph,
init = NULL,
fixParams = integer(0),
parIsTheta = FALSE,
checkValidity = TRUE
)
Arguments
graph |
|
init |
The values used for fixed parameters |
fixParams |
The indices (logical or numeric) of fixed parameters in the full parameter vector. |
parIsTheta |
|
checkValidity |
Whether to check if the implied Gamma/Theta is a valid parameter matrix. |
Value
A function parToMatrices(par, forceGamma=FALSE, forceTheta=FALSE)
,
which takes a parameter vector and returns either NULL
or a list with entries Gamma
, Theta
.
The function returns NULL
if checkValidity==TRUE
and par
implies an invalid matrix.
Otherwise, depending on parIsTheta
, forceTheta
, and forceGamma
, one or both of
Gamma
and Theta
are matrices implied by par
.