Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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

Author(s)

Jarrod Dalton and Benjamin Nutter

Examples

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

HydeNet

Hybrid Bayesian Networks Using R and JAGS

v0.10.11
MIT + file LICENSE
Authors
Jarrod E. Dalton <daltonj@ccf.org> and Benjamin Nutter <benjamin.nutter@gmail.com>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.