vectorProbs: Convert a vector to JAGS Probabilities
Description
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.
Usage
vectorProbs(p, node, normalize = TRUE)
Arguments
p
a vector of counts, weights, or probabilities.
node
the node for the parameters. this is converted to a character
string. It is important that this be given accurately or it will not
match with the code written by writeNetworkModel.
normalize
A logical indicating if the weights in p should
be normalized (each value is taken as a proportion of the sum).