By default, HydeNet uses factor levels for policy values in a decision node, assuming the decision node is a factor variable. In cases where the decision node is a numeric variable, HydeNet will first try to assign the first, second, and third quartiles as policy values. setPolicyValues allows the user flexibility in which values are actually used in the decision network. It can also be used to restrict the levels of a factor variable to a subset of all levels. Policy values may also be set in setNode, but setPolicyValues makes it possible to set the values for multiple nodes in one call.
While most functions available in JAGS have equivalents in R, they don't always use the exact same names. R formulas are converted to character strings, function names translated, and the corresponding JAGS formula is returned.
%>%
(Package: HydeNet) :
Chain together multiple operations.
This is a copy of the documentation for %>% in dplyr. The copy here is made to conform to CRAN requirements regarding documentation. Please see the dplyr documenation for the complete and current documentation.
Based on the information provided about the node, an appropriate JAGS model is written in text. This is combined with the other node models to generate the complete network.
Probability vectors can be passed manually to the model, but they must be formatted in code appropriate to JAGS. vectorProbs will convert a vector of counts or weights to probabilities and format it into JAGS code.
Depending on how your Hyde Network was built, you may not have had the opportunity to declare which nodes are decision or utlity nodes. For instance, when passing a list of models, there is no way to indicate in the model object that the node should be considered a decision node. As a matter of convenience, these function will set any nodes indicated to decision or utility nodes. It will make no other modifications to a node's definition.