Stan is probabilistic programming language that can be used to
specify linear Bayesian species distribution models with one or more point
presence-only and presence-absence biodiversity datasets. Multiple datasets
are fitted jointly with shared covariate effects and dataset-specific
intercepts when requested via the biodiversity dataset settings.
Requires the "cmdstanr" package to be installed!
Arguments
- x
distribution()(i.e.BiodiversityDistribution) object.- chains
A positive
integerspecifying the number of Markov chains (Default:4chains).- iter
A positive
integerspecifying the number of iterations for each chain (including warmup). (Default:2000).- warmup
A positive
integerspecifying the number of warmup iterations per chain. The default isiter/2.- init
Initial values for parameters (Default:
'random').- cores
If set to NULL take values from specified ibis option
getOption('ibis.nthread').- algorithm
Mode used to sample from the posterior. Available options are
"sampling","optimize", or"variational".- control
See
"cmdstanr"for more details on sampler controls.- type
The mode used for creating posterior predictions. Either
"predictor"or"response"(Default:"response").- ...
Other variables.
Value
An Engine.
See also
rstan, cmdstanr
Other engine:
engine_bart(),
engine_breg(),
engine_gdb(),
engine_glm(),
engine_glmnet(),
engine_inla(),
engine_inlabru(),
engine_scampr(),
engine_xgboost()
Examples
if (FALSE) { # \dontrun{
x <- distribution(background) |> engine_stan(iter = 1000)
} # }
