Description Usage Arguments Details Author(s) See Also Examples
View source: R/writeJagsFormula.R
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
writeJagsFormula(fit, nodes, ...) ## S3 method for class 'cpt' writeJagsFormula(fit, nodes, ...) ## S3 method for class 'glm' writeJagsFormula(fit, nodes, bern = bern, ...) ## S3 method for class 'lm' writeJagsFormula(fit, nodes, bern, ...) ## S3 method for class 'multinom' writeJagsFormula(fit, nodes, bern = bern, ...) ## S3 method for class 'survreg' writeJagsFormula(fit, ..., bern = bern) ## S3 method for class 'xtabs' writeJagsFormula(fit, ...)
a model object
a vector of node names, usually passed from
Additional arguments to be passed to other methods
a vector of bernoulli node names
Methods for different model objects can be written so that this function can be extended as desired.
The resulting formulas are based on the coefficient matrix of the fitted model, and the returned result is the JAGS code representing the regression equation of the model.
writeJagsFormula.glm method, appropriate transformations
exist for the following combinations:
family = binomial; link = logit
family = poisson; link = log
family = gaussian; link = identity (calls
Jarrod Dalton and Benjamin Nutter
1 2 3 4 5 6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.