Description Usage Arguments Details Author(s) Examples
View source: R/factorFormula.R
When working in R, it is often more convenient to work in
terms of the factor labels rather than the underlying numeric values.
JAGS, however, requires that the numeric values be used.
factorFormula
permits the user to define formulae to be passed
to JAGS using R style coding, and having factor levels translated
to the underlying values as determined by the network structure.
1 | factorFormula(form, network)
|
form |
A formula object. |
network |
A |
It is assumed that factor variables will be used in logical
comparisons of the format [variable_name] == '[factor_level]'
and
only this pattern is recognized in the text search. Single or
double quotes may be used around the level, and the spaces around the
==
are optional.
Jarrod Dalton and Benjamin Nutter
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
Net <- HydeNetwork(~ wells +
pe | wells +
d.dimer | pregnant*pe +
angio | pe +
treat | d.dimer*angio +
death | pe*treat,
data = PE)
factorFormula(form = payoff ~ (death == 'No') + (pe == 'Yes'),
network = Net)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.