Skip to contents

The function svcTMsPGOcc fits multi-species multi-season spatially-varying coefficient occupancy models with species correlations (i.e., a spatially-explicit joint species distribution model with imperfect detection). We use Polya-Gamma latent variables and a spatial factor modeling approach. Models are implemented using a Nearest Neighbor Gaussian Process.

Usage

svcTMsPGOcc(occ.formula, det.formula, data, inits, priors, tuning, 
            svc.cols = 1, cov.model = 'exponential', NNGP = TRUE, 
            n.neighbors = 15, search.type = 'cb', std.by.sp = FALSE, 
            n.factors, svc.by.sp, n.batch, batch.length, 
            accept.rate = 0.43, n.omp.threads = 1, 
            verbose = TRUE, ar1 = FALSE, n.report = 100, 
            n.burn = round(.10 * n.batch * batch.length), n.thin = 1, 
            n.chains = 1, ...)

Arguments

occ.formula

a symbolic description of the model to be fit for the occurrence portion of the model using R's model syntax. Random intercepts are allowed using lme4 syntax (Bates et al. 2015). Only right-hand side of formula is specified. See example below.

det.formula

a symbolic description of the model to be fit for the detection portion of the model using R's model syntax. Only right-hand side of formula is specified. See example below. Random intercepts are allowed using lme4 syntax (Bates et al. 2015).

data

a list containing data necessary for model fitting. Valid tags are y, occ.covs, det.covs, coords, range.ind, and grid.index. y is a four-dimensional array with first dimension equal to the number of species, second dimension equal to the number of sites, third dimension equal to the number of primary time periods, and fourth dimension equal to the maximum number of secondary replicates at a given site. occ.covs is a list of variables included in the occurrence portion of the model. Each list element is a different occurrence covariate, which can be site level or site/primary time period level. Site-level covariates are specified as a vector of length \(J\) while site/primary time period level covariates are specified as a matrix with rows corresponding to sites and columns correspond to primary time periods. Similarly, det.covs is a list of variables included in the detection portion of the model, with each list element corresponding to an individual variable. In addition to site-level and/or site/primary time period-level, detection covariates can also be observational-level. Observation-level covariates are specified as a three-dimensional array with first dimension corresponding to sites, second dimension corresponding to primary time period, and third dimension corresponding to replicate. coords is a matrix of the observation coordinates used to estimate the SVCs for each site. coords has two columns for the easting and northing coordinate, respectively. Typically, each site in the data set will have it's own coordinate, such that coords is a \(J \times 2\) matrix and grid.index should not be specified. If you desire to estimate SVCs at some larger spatial level, e.g., if points fall within grid cells and you want to estimate an SVC for each grid cell instead of each point, coords can be specified as the coordinate for each grid cell. In such a case, grid.index is an indexing vector of length J, where each value of grid.index indicates the corresponding row in coords that the given site corresponds to. Note that spOccupancy assumes coordinates are specified in a projected coordinate system. range.ind is a matrix with rows corresponding to species and columns corresponding to sites, with each element taking value 1 if that site is within the range of the corresponding species and 0 if it is outside of the range. This matrix is not required, but it can be helpful to restrict the modeled area for each individual species to be within the realistic range of locations for that species when estimating the model parameters. This is applicable when auxiliary data sources are available on the realistic range of the species.

inits

a list with each tag corresponding to a parameter name. Valid tags are alpha.comm, beta.comm, beta, alpha, tau.sq.beta, tau.sq.alpha, sigma.sq.psi, sigma.sq.p, z, phi, lambda, nu, sigma.sq.t, and rho. nu is only specified if cov.model = "matern", sigma.sq.t and rho are only specified if ar1 = TRUE, and sigma.sq.psi and sigma.sq.p are only specified if random effects are included in occ.formula or det.formula, respectively. The value portion of each tag is the parameter's initial value. See priors description for definition of each parameter name. Additionally, the tag fix can be set to TRUE to fix the starting values across all chains. If fix is not specified (the default), starting values are varied randomly across chains.

priors

a list with each tag corresponding to a parameter name. Valid tags are beta.comm.normal, alpha.comm.normal, tau.sq.beta.ig, tau.sq.alpha.ig, sigma.sq.psi, sigma.sq.p, phi.unif, nu.unif, sigma.sq.t.ig, and rho.unif. Community-level occurrence (beta.comm) and detection (alpha.comm) regression coefficients are assumed to follow a normal distribution. The hyperparameters of the normal distribution are passed as a list of length two with the first and second elements corresponding to the mean and variance of the normal distribution, which are each specified as vectors of length equal to the number of coefficients to be estimated or of length one if priors are the same for all coefficients. If not specified, prior means are set to 0 and prior variances set to 2.73. By default, community-level variance parameters for occupancy (tau.sq.beta) and detection (tau.sq.alpha) are assumed to follow an inverse Gamma distribution. The hyperparameters of the inverse gamma distribution are passed as a list of length two with the first and second elements corresponding to the shape and scale parameters, which are each specified as vectors of length equal to the number of coefficients to be estimated or a single value if priors are the same for all parameters. If not specified, prior shape and scale parameters are set to 0.1. If desired, the species-specific occupancy coefficients (beta) and/or detection coefficients (alpha) can also be estimated indepdendently by specifying the tag independent.betas = TRUE and/or independent.alphas = TRUE, respectively. If specified, this will not estimate species-specific coefficients as random effects from a common-community-level distribution, and rather the values of beta.comm/alpha.comm and tau.sq.beta/tau.sq.alpha will be fixed at the specified initial values. This is equivalent to specifying a Gaussian, independent prior for each of the species-specific effects. The spatial factor model fits n.factors independent spatial processes for each spatially-varying coefficient specified in svc.cols. The spatial decay phi and smoothness nu parameters for each latent factor are assumed to follow Uniform distributions. The hyperparameters of the Uniform are passed as a list with two elements, with both elements being vectors of length n.factors * length(svc.cols) corresponding to the lower and upper support, respectively, or as a single value if the same value is assigned for all factor/SVC combinations. The priors for the factor loadings matrix lambda for each SVC are fixed following the standard spatial factor model to ensure parameter identifiability (Christensen and Amemlya 2002). The upper triangular elements of the N x n.factors matrix are fixed at 0 and the diagonal elements are fixed at 1 for each SVC. The lower triangular elements are assigned a standard normal prior (i.e., mean 0 and variance 1). sigma.sq.psi and sigma.sq.p are the random effect variances for any occurrence or detection random effects, respectively, and are assumed to follow an inverse Gamma distribution. The hyperparameters of the inverse-Gamma distribution are passed as a list of length two with first and second elements corresponding to the shape and scale parameters, respectively, which are each specified as vectors of length equal to the number of random intercepts or of length one if priors are the same for all random effect variances. sigma.sq.t and rho are the AR(1) variance and correlation parameters for the AR(1) zero-mean temporal random effects, respectively. sigma.sq.t is assumed to follow an inverse-Gamma distribution, where the hyperparameters are specified as a list of length two with the first and second elements corresponding to the shape and scale parameters, respectively, which can each be specified as vector equal to the number of species in the model or a single value if the same prior is used for all species. rho is assumed to follow a uniform distribution, where the hyperparameters are specified similarly as a list of length two with the first and second elements corresponding to the lower and upper bounds of the uniform prior, which can each be specified as vector equal to the number of species in the model or a single value if the same prior is used for all species.

tuning

a list with each tag corresponding to a parameter name. Valid tags are phi, nu, and rho. The value portion of each tag defines the initial variance of the adaptive sampler. We assume the initial variance of the adaptive sampler is the same for each species, although the adaptive sampler will adjust the tuning variances separately for each species. See Roberts and Rosenthal (2009) for details.

svc.cols

a vector indicating the variables whose effects will be estimated as spatially-varying coefficients. svc.cols can be an integer vector with values indicating the order of covariates specified in the model formula (with 1 being the intercept if specified), or it can be specified as a character vector with names corresponding to variable names in occ.covs (for the intercept, use '(Intercept)'). svc.cols default argument of 1 results in a spatial occupancy model analogous to sfMsPGOcc (assuming an intercept is included in the model).

cov.model

a quoted keyword that specifies the covariance function used to model the spatial dependence structure among the observations. Supported covariance model key words are: "exponential", "matern", "spherical", and "gaussian".

NNGP

if TRUE, model is fit with an NNGP. If FALSE, a full Gaussian process is used. See Datta et al. (2016) and Finley et al. (2019) for more information. Only NNGP = TRUE is currently supported.

n.neighbors

number of neighbors used in the NNGP. Only used if NNGP = TRUE. Datta et al. (2016) showed that 15 neighbors is usually sufficient, but that as few as 5 neighbors can be adequate for certain data sets, which can lead to even greater decreases in run time. We recommend starting with 15 neighbors (the default) and if additional gains in computation time are desired, subsequently compare the results with a smaller number of neighbors using WAIC.

search.type

a quoted keyword that specifies the type of nearest neighbor search algorithm. Supported method key words are: "cb" and "brute". The "cb" should generally be much faster. If locations do not have identical coordinate values on the axis used for the nearest neighbor ordering then "cb" and "brute" should produce identical neighbor sets. However, if there are identical coordinate values on the axis used for nearest neighbor ordering, then "cb" and "brute" might produce different, but equally valid, neighbor sets, e.g., if data are on a grid.

std.by.sp

a logical value indicating whether the covariates are standardized separately for each species within the corresponding range for each species (TRUE) or not (FALSE). Note that if range.ind is specified in data.list, this will result in the covariates being standardized differently for each species based on the sites where range.ind == 1 for that given species. If range.ind is not specified and std.by.sp = TRUE, this will simply be equivalent to standardizing the covariates across all locations prior to fitting the model. Note that the covariates in occ.formula should still be standardized across all locations. This can be done either outside the function, or can be done by specifying scale() in the model formula around the continuous covariates.

n.factors

the number of factors to use in the spatial factor model approach. Note this corresponds to the number of factors used for each spatially-varying coefficient that is estimated in the model. Typically, the number of factors is set to be small (e.g., 4-5) relative to the total number of species in the community, which will lead to substantial decreases in computation time. However, the value can be anywhere between 1 and N (the number of species in the community).

svc.by.sp

an optional list with length equal to length(svc.cols). Each element of the list should be a logical vector of length N (number of species) where each element is TRUE, which indicates the SVC should be estimated for that species, or 0, which indicates the SVC should be set to 0 and no SVC for that parameter will be estimated. Note the first n.factors SVCs for all spatially-varying coefficients must be set to TRUE. By default, SVCs are modeled for all species.

n.batch

the number of MCMC batches in each chain to run for the Adaptive MCMC sampler. See Roberts and Rosenthal (2009) for details.

batch.length

the length of each MCMC batch to run for the Adaptive MCMC sampler. See Roberts and Rosenthal (2009) for details.

accept.rate

target acceptance rate for Adaptive MCMC. Defaul is 0.43. See Roberts and Rosenthal (2009) for details.

n.omp.threads

a positive integer indicating the number of threads to use for SMP parallel processing. The package must be compiled for OpenMP support. For most Intel-based machines, we recommend setting n.omp.threads up to the number of hyperthreaded cores. Note, n.omp.threads > 1 might not work on some systems.

verbose

if TRUE, messages about data preparation, model specification, and progress of the sampler are printed to the screen. Otherwise, no messages are printed.

ar1

logical value indicating whether to include an AR(1) zero-mean temporal random effect in the model. If FALSE, the model is fit without an AR(1) temporal autocovariance structure. If TRUE, an AR(1) random effect is included in the model to account for temporal autocorrelation across the primary time periods.

n.report

the interval to report Metropolis sampler acceptance and MCMC progress. Note this is specified in terms of batches and not overall samples for spatial models.

n.burn

the number of samples out of the total n.samples to discard as burn-in for each chain. By default, the first 10% of samples is discarded.

n.thin

the thinning interval for collection of MCMC samples. The thinning occurs after the n.burn samples are discarded. Default value is set to 1.

n.chains

the number of chains to run in sequence.

...

currently no additional arguments

Note

Some of the underlying code used for generating random numbers from the Polya-Gamma distribution is taken from the pgdraw package written by Daniel F. Schmidt and Enes Makalic. Their code implements Algorithm 6 in PhD thesis of Jesse Bennett Windle (2013) https://repositories.lib.utexas.edu/handle/2152/21842.

References

Datta, A., S. Banerjee, A.O. Finley, and A.E. Gelfand. (2016) Hierarchical Nearest-Neighbor Gaussian process models for large geostatistical datasets. Journal of the American Statistical Association, doi:10.1080/01621459.2015.1044091 .

Finley, A.O., A. Datta, B.D. Cook, D.C. Morton, H.E. Andersen, and S. Banerjee. (2019) Efficient algorithms for Bayesian Nearest Neighbor Gaussian Processes. Journal of Computational and Graphical Statistics, doi:10.1080/10618600.2018.1537924 .

Finley, A. O., Datta, A., and Banerjee, S. (2020). spNNGP R package for nearest neighbor Gaussian process models. arXiv preprint arXiv:2001.09111.

Polson, N.G., J.G. Scott, and J. Windle. (2013) Bayesian Inference for Logistic Models Using Polya-Gamma Latent Variables. Journal of the American Statistical Association, 108:1339-1349.

Roberts, G.O. and Rosenthal J.S. (2009) Examples of adaptive MCMC. Journal of Computational and Graphical Statistics, 18(2):349-367.

Bates, Douglas, Martin Maechler, Ben Bolker, Steve Walker (2015). Fitting Linear Mixed-Effects Models Using lme4. Journal of Statistical Software, 67(1), 1-48. doi:10.18637/jss.v067.i01 .

Hooten, M. B., and Hobbs, N. T. (2015). A guide to Bayesian model selection for ecologists. Ecological Monographs, 85(1), 3-28.

Christensen, W. F., and Amemiya, Y. (2002). Latent variable analysis of multivariate spatial data. Journal of the American Statistical Association, 97(457), 302-317.

Author

Jeffrey W. Doser doserjef@msu.edu,
Andrew O. Finley finleya@msu.edu

Value

An object of class svcTMsPGOcc that is a list comprised of:

beta.comm.samples

a coda object of posterior samples for the community level occurrence regression coefficients.

alpha.comm.samples

a coda object of posterior samples for the community level detection regression coefficients.

tau.sq.beta.samples

a coda object of posterior samples for the occurrence community variance parameters.

tau.sq.alpha.samples

a coda object of posterior samples for the detection community variance parameters.

beta.samples

a coda object of posterior samples for the species level occurrence regression coefficients.

alpha.samples

a coda object of posterior samples for the species level detection regression coefficients.

theta.samples

a coda object of posterior samples for the species level correlation parameters for each spatially-varying coefficient and the temporal autocorrelation parameters for each species when ar1 = TRUE.

lambda.samples

a coda object of posterior samples for the latent spatial factor loadings for each spatially-varying coefficient.

z.samples

a four-dimensional array of posterior samples for the latent occurrence values for each species. Dimensions corresopnd to MCMC sample, species, site, and primary time period.

psi.samples

a four-dimensional array of posterior samples for the latent occupancy probability values for each species. Dimensions correspond to MCMC sample, species, site, and primary time period.

w.samples

a four-dimensional array of posterior samples for the latent spatial random effects for each spatial factor within each spatially-varying coefficient. Dimensions correspond to MCMC sample, factor, site, and spatially-varying coefficient.

sigma.sq.psi.samples

a coda object of posterior samples for variances of random intercepts included in the occurrence portion of the model. Only included if random intercepts are specified in occ.formula.

sigma.sq.p.samples

a coda object of posterior samples for variances of random intercpets included in the detection portion of the model. Only included if random intercepts are specified in det.formula.

beta.star.samples

a coda object of posterior samples for the occurrence random effects. Only included if random intercepts are specified in occ.formula.

alpha.star.samples

a coda object of posterior samples for the detection random effects. Only included if random intercepts are specified in det.formula.

like.samples

a four-dimensional array of posterior samples for the likelihood value used for calculating WAIC. Dimensions correspond to MCMC sample, species, site, and time period.

rhat

a list of Gelman-Rubin diagnostic values for some of the model parameters.

ESS

a list of effective sample sizes for some of the model parameters.

run.time

MCMC sampler execution time reported using proc.time().

The return object will include additional objects used for subsequent prediction and/or model fit evaluation. Note that detection probability estimated values are not included in the model object, but can be extracted using fitted().

Examples

# Simulate Data -----------------------------------------------------------
set.seed(500)
J.x <- 8
J.y <- 8
J <- J.x * J.y
# Years sampled
n.time <- sample(3:10, J, replace = TRUE)
# n.time <- rep(10, J)
n.time.max <- max(n.time)
# Replicates
n.rep <- matrix(NA, J, max(n.time))
for (j in 1:J) {
  n.rep[j, 1:n.time[j]] <- sample(2:4, n.time[j], replace = TRUE)
}
N <- 7
# Community-level covariate effects
# Occurrence
beta.mean <- c(-3, -0.2, 0.5)
trend <- FALSE
sp.only <- 0
p.occ <- length(beta.mean)
tau.sq.beta <- c(0.6, 1.5, 1.4)
# Detection
alpha.mean <- c(0, 1.2, -1.5)
tau.sq.alpha <- c(1, 0.5, 2.3)
p.det <- length(alpha.mean)
# Random effects
psi.RE <- list()
p.RE <- list()
# Draw species-level effects from community means.
beta <- matrix(NA, nrow = N, ncol = p.occ)
alpha <- matrix(NA, nrow = N, ncol = p.det)
for (i in 1:p.occ) {
  beta[, i] <- rnorm(N, beta.mean[i], sqrt(tau.sq.beta[i]))
}
for (i in 1:p.det) {
  alpha[, i] <- rnorm(N, alpha.mean[i], sqrt(tau.sq.alpha[i]))
}
sp <- TRUE
svc.cols <- c(1, 2)
p.svc <- length(svc.cols)
n.factors <- 3
phi <- runif(p.svc * n.factors, 3 / .9, 3 / .3)
factor.model <- TRUE
cov.model <- 'exponential'

dat <- simTMsOcc(J.x = J.x, J.y = J.y, n.time = n.time, n.rep = n.rep, N = N,
                 beta = beta, alpha = alpha, sp.only = sp.only, trend = trend,
                 psi.RE = psi.RE, p.RE = p.RE, factor.model = factor.model,
                 svc.cols = svc.cols, n.factors = n.factors, phi = phi, sp = sp,
                 cov.model = cov.model)

y <- dat$y
X <- dat$X
X.p <- dat$X.p
coords <- dat$coords
X.re <- dat$X.re
X.p.re <- dat$X.p.re

occ.covs <- list(occ.cov.1 = X[, , 2],
                 occ.cov.2 = X[, , 3])
det.covs <- list(det.cov.1 = X.p[, , , 2],
                 det.cov.2 = X.p[, , , 3])

data.list <- list(y = y, occ.covs = occ.covs,
                  det.covs = det.covs,
                  coords = coords)
# Priors
prior.list <- list(beta.comm.normal = list(mean = 0, var = 2.72),
                   alpha.comm.normal = list(mean = 0, var = 2.72),
                   tau.sq.beta.ig = list(a = 0.1, b = 0.1),
                   tau.sq.alpha.ig = list(a = 0.1, b = 0.1),
                   phi.unif = list(a = 3 / .9, b = 3 / .1))
z.init <- apply(y, c(1, 2, 3), function(a) as.numeric(sum(a, na.rm = TRUE) > 0))
inits.list <- list(alpha.comm = 0, beta.comm = 0, beta = 0,
                   alpha = 0, tau.sq.beta = 1, tau.sq.alpha = 1,
                   phi = 3 / .5, z = z.init)
# Tuning
tuning.list <- list(phi = 1)

# Number of batches
n.batch <- 5
# Batch length
batch.length <- 25
n.burn <- 25
n.thin <- 1
n.samples <- n.batch * batch.length

out <- svcTMsPGOcc(occ.formula = ~ occ.cov.1 + occ.cov.2,
                   det.formula = ~ det.cov.1 + det.cov.2,
                   data = data.list,
                   inits = inits.list,
                   n.batch = n.batch,
                   batch.length = batch.length,
                   accept.rate = 0.43,
                   NNGP = TRUE,
                   n.neighbors = 5,
                   n.factors = n.factors,
                   svc.cols = svc.cols,
                   cov.model = 'exponential',
                   priors = prior.list,
                   tuning = tuning.list,
                   n.omp.threads = 1,
                   verbose = TRUE,
                   n.report = 1,
                   n.burn = n.burn,
                   n.thin = n.thin,
                   n.chains = 1)
#> ----------------------------------------
#> 	Preparing to run the model
#> ----------------------------------------
#> lambda is not specified in initial values.
#> Setting initial values of the lower triangle to 0
#> ----------------------------------------
#> 	Building the neighbor list
#> ----------------------------------------
#> ----------------------------------------
#> Building the neighbors of neighbors list
#> ----------------------------------------
#> ----------------------------------------
#> 	Model description
#> ----------------------------------------
#> Spatial Factor NNGP Multi-season Multi-species Occupancy Model with Polya-Gamma latent
#> variables with 64 sites, 7 species, and 10 primary time periods.
#> 
#> Samples per chain: 125 (5 batches of length 25)
#> Burn-in: 25 
#> Thinning Rate: 1 
#> Number of Chains: 1 
#> Total Posterior Samples: 100 
#> 
#> Number of spatially-varying coefficients: 2 
#> Using the exponential spatial correlation model.
#> 
#> Using 3 latent spatial factors.
#> Using 5 nearest neighbors.
#> 
#> Source compiled with OpenMP support and model fit using 1 thread(s).
#> 
#> Adaptive Metropolis with target acceptance rate: 43.0
#> ----------------------------------------
#> 	Chain 1
#> ----------------------------------------
#> Sampling ... 
#> Batch: 1 of 5, 20.00%
#> 	Coefficient	Latent Factor	Acceptance	Tuning
#> 	1		1		64.0		1.02020
#> 	1		2		60.0		1.02020
#> 	1		3		72.0		1.02020
#> 	2		1		68.0		1.02020
#> 	2		2		60.0		1.02020
#> 	2		3		80.0		1.02020
#> -------------------------------------------------
#> Batch: 2 of 5, 40.00%
#> 	Coefficient	Latent Factor	Acceptance	Tuning
#> 	1		1		52.0		1.03045
#> 	1		2		64.0		1.03045
#> 	1		3		84.0		1.03045
#> 	2		1		76.0		1.03045
#> 	2		2		40.0		1.01005
#> 	2		3		64.0		1.03045
#> -------------------------------------------------
#> Batch: 3 of 5, 60.00%
#> 	Coefficient	Latent Factor	Acceptance	Tuning
#> 	1		1		64.0		1.04081
#> 	1		2		64.0		1.04081
#> 	1		3		52.0		1.04081
#> 	2		1		56.0		1.04081
#> 	2		2		56.0		1.02020
#> 	2		3		64.0		1.04081
#> -------------------------------------------------
#> Batch: 4 of 5, 80.00%
#> 	Coefficient	Latent Factor	Acceptance	Tuning
#> 	1		1		72.0		1.05127
#> 	1		2		68.0		1.05127
#> 	1		3		76.0		1.05127
#> 	2		1		84.0		1.05127
#> 	2		2		60.0		1.03045
#> 	2		3		56.0		1.05127
#> -------------------------------------------------
#> Batch: 5 of 5, 100.00%

summary(out)
#> 
#> Call:
#> svcTMsPGOcc(occ.formula = ~occ.cov.1 + occ.cov.2, det.formula = ~det.cov.1 + 
#>     det.cov.2, data = data.list, inits = inits.list, priors = prior.list, 
#>     tuning = tuning.list, svc.cols = svc.cols, cov.model = "exponential", 
#>     NNGP = TRUE, n.neighbors = 5, n.factors = n.factors, n.batch = n.batch, 
#>     batch.length = batch.length, accept.rate = 0.43, n.omp.threads = 1, 
#>     verbose = TRUE, n.report = 1, n.burn = n.burn, n.thin = n.thin, 
#>     n.chains = 1)
#> 
#> Samples per Chain: 125
#> Burn-in: 25
#> Thinning Rate: 1
#> Number of Chains: 1
#> Total Posterior Samples: 100
#> Run Time (min): 0.0121
#> 
#> ----------------------------------------
#> 	Community Level
#> ----------------------------------------
#> Occurrence Means (logit scale): 
#>                Mean     SD    2.5%     50%   97.5% Rhat ESS
#> (Intercept) -3.0157 0.1809 -3.3647 -3.0105 -2.6576   NA 100
#> occ.cov.1    0.5006 0.3090 -0.2422  0.4889  1.0606   NA 100
#> occ.cov.2    0.5435 0.5240 -0.5298  0.6062  1.5063   NA  64
#> 
#> Occurrence Variances (logit scale): 
#>               Mean     SD   2.5%    50%  97.5% Rhat ESS
#> (Intercept) 0.2248 0.1423 0.0559 0.1911 0.5562   NA  61
#> occ.cov.1   0.7832 1.0479 0.1567 0.4719 3.5004   NA  19
#> occ.cov.2   1.8111 1.0275 0.5860 1.6076 4.1214   NA  64
#> 
#> Detection Means (logit scale): 
#>                Mean     SD    2.5%     50%   97.5% Rhat ESS
#> (Intercept) -0.0933 0.2300 -0.5877 -0.1234  0.4127   NA 100
#> det.cov.1    0.8952 0.2606  0.3335  0.9175  1.3765   NA  43
#> det.cov.2   -1.3495 0.5049 -2.2550 -1.3797 -0.3421   NA 151
#> 
#> Detection Variances (logit scale): 
#>               Mean     SD   2.5%    50%  97.5% Rhat ESS
#> (Intercept) 0.2889 0.2707 0.0374 0.1908 0.9352   NA  18
#> det.cov.1   0.5400 0.4262 0.1010 0.4443 1.7717   NA  73
#> det.cov.2   1.9360 1.5272 0.4634 1.4144 5.4472   NA  60
#> 
#> ----------------------------------------
#> 	Species Level
#> ----------------------------------------
#> Occurrence (logit scale): 
#>                    Mean     SD    2.5%     50%   97.5% Rhat ESS
#> (Intercept)-sp1 -3.3993 0.2965 -3.8853 -3.4235 -2.7940   NA  10
#> (Intercept)-sp2 -3.2985 0.2131 -3.6686 -3.3091 -2.8393   NA  25
#> (Intercept)-sp3 -2.7002 0.3176 -3.1871 -2.7416 -2.1159   NA   6
#> (Intercept)-sp4 -2.6178 0.2152 -3.0295 -2.6241 -2.2448   NA  14
#> (Intercept)-sp5 -3.1986 0.1992 -3.6167 -3.1780 -2.8444   NA  23
#> (Intercept)-sp6 -2.9430 0.2405 -3.4669 -2.9248 -2.5725   NA  12
#> (Intercept)-sp7 -3.3678 0.2417 -3.9004 -3.3570 -2.9794   NA  17
#> occ.cov.1-sp1    0.1551 0.2388 -0.2918  0.1519  0.6547   NA  44
#> occ.cov.1-sp2    0.9023 0.3131  0.3626  0.8971  1.4802   NA  13
#> occ.cov.1-sp3    0.2387 0.3307 -0.3701  0.2164  0.8067   NA   7
#> occ.cov.1-sp4    0.1917 0.2108 -0.2130  0.2222  0.5739   NA  15
#> occ.cov.1-sp5    1.3885 0.4010  0.6718  1.3477  2.0838   NA   8
#> occ.cov.1-sp6   -0.1921 0.2130 -0.5920 -0.1919  0.2193   NA  33
#> occ.cov.1-sp7    1.0814 0.2977  0.5439  1.0811  1.5911   NA  10
#> occ.cov.2-sp1    0.6878 0.2874  0.2481  0.7015  1.2040   NA  18
#> occ.cov.2-sp2    2.1556 0.3294  1.6566  2.0887  2.7936   NA  11
#> occ.cov.2-sp3   -0.5727 0.2023 -0.9535 -0.5630 -0.2275   NA  18
#> occ.cov.2-sp4   -0.5745 0.1861 -0.8797 -0.5867 -0.1640   NA  27
#> occ.cov.2-sp5   -0.0962 0.1989 -0.5464 -0.0878  0.2292   NA  33
#> occ.cov.2-sp6    1.3158 0.2046  0.9678  1.2846  1.7262   NA  27
#> occ.cov.2-sp7    1.9417 0.2760  1.4728  1.9245  2.5041   NA  16
#> 
#> Detection (logit scale): 
#>                    Mean     SD    2.5%     50%   97.5% Rhat ESS
#> (Intercept)-sp1  0.5152 0.3395 -0.0421  0.4632  1.2022   NA  15
#> (Intercept)-sp2 -0.6530 0.2473 -1.1469 -0.6362 -0.1426   NA  16
#> (Intercept)-sp3 -0.2736 0.2280 -0.7369 -0.2661  0.1518   NA  43
#> (Intercept)-sp4 -0.0623 0.2235 -0.4327 -0.0882  0.3501   NA  38
#> (Intercept)-sp5  0.1084 0.1744 -0.2642  0.1148  0.4045   NA  42
#> (Intercept)-sp6  0.0284 0.2140 -0.4170  0.0517  0.3879   NA  33
#> (Intercept)-sp7 -0.1555 0.1975 -0.5602 -0.1488  0.2013   NA 155
#> det.cov.1-sp1    1.2674 0.2865  0.8117  1.2541  1.8413   NA  30
#> det.cov.1-sp2    0.4039 0.1707  0.0620  0.4009  0.7023   NA  70
#> det.cov.1-sp3    0.3810 0.2366 -0.0234  0.3846  0.8636   NA  21
#> det.cov.1-sp4    0.8732 0.2122  0.4846  0.8880  1.2382   NA  40
#> det.cov.1-sp5    1.8008 0.2318  1.4528  1.7794  2.3305   NA  99
#> det.cov.1-sp6    0.8136 0.2129  0.3598  0.8286  1.2295   NA  47
#> det.cov.1-sp7    0.8473 0.2521  0.3798  0.8504  1.4134   NA  40
#> det.cov.2-sp1   -0.6409 0.2945 -1.1588 -0.6206 -0.0036   NA  44
#> det.cov.2-sp2   -0.5240 0.1929 -0.9351 -0.4948 -0.2116   NA  83
#> det.cov.2-sp3   -3.9279 0.5330 -4.9907 -3.8799 -3.0045   NA   8
#> det.cov.2-sp4   -1.4664 0.2462 -1.9145 -1.4871 -1.0378   NA  37
#> det.cov.2-sp5   -0.8517 0.1906 -1.2094 -0.8470 -0.5357   NA  63
#> det.cov.2-sp6   -1.5930 0.2421 -2.0996 -1.5530 -1.1745   NA  76
#> det.cov.2-sp7   -1.4233 0.3057 -2.0715 -1.3941 -0.9043   NA  26
#> 
#> ----------------------------------------
#> 	Spatio-temporal Covariance: 
#> ----------------------------------------
#>                      Mean     SD   2.5%     50%   97.5% Rhat ESS
#> phi-1-(Intercept)  9.1297 4.7886 4.2041  7.7641 21.9903   NA  10
#> phi-2-(Intercept) 14.1430 6.1758 6.7700 12.6090 29.0871   NA   7
#> phi-3-(Intercept) 19.1902 6.1460 9.2634 19.5483 28.6300   NA   6
#> phi-1-occ.cov.1   19.2071 6.5292 4.8852 19.7689 28.8773   NA   8
#> phi-2-occ.cov.1   10.2709 3.1148 5.7255  9.7340 18.7743   NA  13
#> phi-3-occ.cov.1   16.6412 6.5455 7.3522 16.2557 28.8341   NA  10