View source: R/jsdm_stancode.R
jsdm_stancode | R Documentation |
This function returns the Stan code used to fit the model as specified by the data list, family and method.
jsdm_stancode(
method,
family,
prior = jsdm_prior(),
log_lik = TRUE,
site_intercept = "none",
beta_param = "cor",
zi_param = "constant"
)
## S3 method for class 'jsdmstan_model'
print(x, ...)
method |
The method, one of |
family |
is the response family, must be one of |
prior |
The prior, given as the result of a call to |
log_lik |
Whether the log likelihood should be calculated in the generated
quantities (by default |
site_intercept |
Whether a site intercept should be included, potential
values |
beta_param |
The parameterisation of the environmental covariate effects, by
default |
zi_param |
For the zero-inflated families, whether the zero-inflation parameter
is a species-specific constant (default, |
x |
The jsdm_stancode object |
... |
Currently unused |
Environmental covariate effects ("betas"
) can be parameterised in two
ways. With the "cor"
parameterisation all covariate effects are assumed
to be constrained by a correlation matrix between the covariates. With the
"unstruct"
parameterisation all covariate effects are assumed to draw
from a simple distribution with no correlation structure. Both parameterisations
can be modified using the prior object.
A character vector of Stan code, class "jsdmstan_model"
print(jsdmstan_model)
: A printing function for jsdmstan_model objects
jsdm_stancode(family = "gaussian", method = "gllvm")
jsdm_stancode(family = "poisson", method = "mglmm")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.