jags_model | R Documentation |
jags_model()
prints the code needed for model specification when using JAGS
. The models and distribution options are quite general,
so the user can grasp the structure of the code. However, this models are widely used without added complexity. Note that JAGS
accepts a
wide range of distributions for the likelihood parameter.
jags_model(likelihood, regression, param = F, reg = F)
likelihood |
Likelihood function. It accepts "dnorm", "dbinom", "dpois", and "dbern". |
regression |
A function accepting "linear", "logit", and "log" as part of the likelihood specification. |
param |
Logical with |
reg |
Logical with |
There is a lot more flexibility for JAGS
models than the ones specified. However, this is a general
representation of the code one would use. Some other distribution examples can be found in jags_param
.
Note that it only makes sense to use a linear regression with a normal likelihood, since the othe distributions are discrete distributions.
jags_param
jags_model("dnorm", "linear", param = FALSE, reg = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.