vectorProbs: Convert a vector to JAGS Probabilities

Description Usage Arguments Author(s) Examples

View source: R/vectorProbs.R

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

1
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).

Author(s)

Jarrod Dalton and Benjamin Nutter

Examples

1
vectorProbs(c(1, 2, 3), "wells")

HydeNet documentation built on July 8, 2020, 5:15 p.m.