tvvarss
is the primary function for fitting TVVARSS models data.
tvvarss( y, de_mean = TRUE, topo = NULL, dynamicB = TRUE, family = "gaussian", x0 = NULL, shared_q = NULL, shared_r = NULL, process = NULL, mcmc_iter = 1000, mcmc_warmup = 500, mcmc_thin = 1, mcmc_chain = 3, ... )
y | The data (array, with dimensions = site, year, species) |
---|---|
de_mean | Whether or not to de_mean the process model; defaults to TRUE. For example, \(X_{t+1} = B_{t} (X_{t} - pred[X_{t}])\) versus \(X_{t+1} = B_{t} X_{t}\). |
topo | Optional list matrix describing the presumed topology of the community. Pairwise interactions are specified as density-dependent ("dd"), top-down ("td"), bottom-up ("bu"), competitive/facilitative ("cf"), or absent ("zero"). |
dynamicB | Logical indicator of whether to fit a dynamic B matrix that varies through time (or a static B matrix that does not); defaults to TRUE. |
family | Statistical distribution for the observation model, defaults to "gaussian". But can be any of "gaussian", "binomial", "poisson", "gamma", "lognormal" |
x0 | The location matrix (mean) of priors on initial states; defaults to centered on observed data. |
shared_q | Optional matrix (number of species x number of sites) with integers indicating which process variance parameters are shared; defaults to unique process variances for each species that are shared across sites. |
shared_r | Optional matrix (number of species x number of sites) with integers indicating which observation variance parameters are shared; defaults to unique observation variances for each species that are shared across sites. |
process | Vector that optionally maps sites to states. Defaults to each site as its own state |
mcmc_iter | Number of MCMC iterations, defaults to 1000 |
mcmc_warmup | Warmup / burn in phase, defaults to 500 |
mcmc_thin | MCMC thin, defaults to 1 |
mcmc_chain | MCMC chains, defaults to 3 |
... | Extra arguments to pass to sampling |
an object of class 'stanfit'