When ...
is not used, the default policy matrix is defined
as all possible combinations of the levels in the network's decision
nodes. If no decision nodes are defined, an error is returned. Note that
the default policy matrix returns JAGS-ready values, which are numeric
according to the level number of a factor. In user-defined matrices,
character values are supported and will be converted to numerics when the
JAGS model is compiled.
Semi-custom policy matrices can be defined by providing the values of each
node to be considered. When manually supplying values, the nodes must
exist in network, but the requirement that they be decision nodes is not
enforced. Thus, it is possible to include numeric values in a decision
matrix.
Policy matrices can be passed to HydeSim
to run posterior
distributions on each row of the policy matrix. There is nothing
particularly special about the policy matrices returned by
policyMatrix
; they are simply data frame that require names drawn
from the nodes in the network. Any data frame can be passed to
HydeSim
and a check is done there to confirm all of the
column names match a node in the network.
Whenever a node is identified as a deterministic node, its policy values
are forced to NULL
, regardless of what the user has specified.