Function for Fitting Multi-Species Spatially-Varying Coefficient Occupancy Models
svcMsPGOcc.Rd
The function svcMsPGOcc
fits multi-species 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
svcMsPGOcc(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, n.batch, batch.length,
accept.rate = 0.43, n.omp.threads = 1,
verbose = TRUE, 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
, andrange.ind
.y
is a three-dimensional array with first dimension equal to the number of species, second dimension equal to the number of sites, and third dimension equal to the maximum number of replicates at a given site.occ.covs
is a matrix or data frame containing the variables used in the occurrence portion of the model, with \(J\) rows for each column (variable).det.covs
is a list of variables included in the detection portion of the model. Each list element is a different detection covariate, which can be site-level or observational-level. Site-level covariates are specified as a vector of length \(J\) while observation-level covariates are specified as a matrix or data frame with the number of rows equal to \(J\) and number of columns equal to the maximum number of replicates at a given site.coords
is a \(J \times 2\) matrix of the observation coordinates. Note thatspOccupancy
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
, andnu
.nu
is only specified ifcov.model = "matern"
, andsigma.sq.psi
andsigma.sq.p
are only specified if random effects are included inocc.formula
ordet.formula
, respectively. The value portion of each tag is the parameter's initial value. Seepriors
description for definition of each parameter name. Additionally, the tagfix
can be set toTRUE
to fix the starting values across all chains. Iffix
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
, andnu.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.72. 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. The spatial factor model fitsn.factors
independent spatial processes for each spatially-varying coefficient specified insvc.cols
. The spatial decayphi
and smoothnessnu
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 lengthn.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 matrixlambda
for each SVC are fixed following the standard spatial factor model to ensure parameter identifiability (Christensen and Amemlya 2002). The upper triangular elements of theN 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
andsigma.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.- tuning
a list with each tag corresponding to a parameter name. Valid tags are
phi
andnu
. 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 inocc.covs
(for the intercept, use'(Intercept)'
).svc.cols
default argument of 1 results in a spatial occupancy model analogous tosfMsPGOcc
(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. IfFALSE
, a full Gaussian process is used. See Datta et al. (2016) and Finley et al. (2019) for more information. OnlyNNGP = 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 ifrange.ind
is specified indata.list
, this will result in the covariates being standardized differently for each species based on the sites whererange.ind == 1
for that given species. Ifrange.ind
is not specified andstd.by.sp = TRUE
, this will simply be equivalent to standardizing the covariates across all locations prior to fitting the model. Note that the covariates inocc.formula
should still be standardized across all locations. This can be done either outside the function, or can be done by specifyingscale()
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).
- 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 within chains. 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.- 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
Doser, J. W., Finley, A. O., Saunders, S. P., Kery, M., Weed, A. S., & Zipkin, E. F. (2024A). Modeling complex species-environment relationships through spatially-varying coefficient occupancy models. Journal of Agricultural, Biological and Environmental Statistics. doi:10.1007/s13253-023-00595-6 .
Doser, J. W., Kery, M., Saunders, S. P., Finley, A. O., Bateman, B. L., Grand, J., Reault, S., Weed, A. S., & Zipkin, E. F. (2024B). Guidelines for the use of spatially varying coefficients in species distribution models. Global Ecology and Biogeography, 33(4), e13814. doi:10.1111/geb.13814 .
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 .
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 .
Author
Jeffrey W. Doser doserjef@msu.edu,
Andrew O. Finley finleya@msu.edu
Value
An object of class svcMsPGOcc
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.- lambda.samples
a
coda
object of posterior samples for the latent spatial factor loadings for each spatially-varying coefficient.- z.samples
a three-dimensional array of posterior samples for the latent occurrence values for each species.
- psi.samples
a three-dimensional array of posterior samples for the latent occupancy probability values for each species.
- 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 inocc.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 indet.formula
.- beta.star.samples
a
coda
object of posterior samples for the occurrence random effects. Only included if random intercepts are specified inocc.formula
.- alpha.star.samples
a
coda
object of posterior samples for the detection random effects. Only included if random intercepts are specified indet.formula
.- like.samples
a three-dimensional array of posterior samples for the likelihood value associated with each site and species. Used for calculating WAIC.
- 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
set.seed(400)
# Simulate Data -----------------------------------------------------------
J.x <- 10
J.y <- 10
J <- J.x * J.y
n.rep <- sample(5, size = J, replace = TRUE)
N <- 6
# Community-level covariate effects
# Occurrence
beta.mean <- c(0.2, -0.2, 0.3, -0.1, 0.4)
p.occ <- length(beta.mean)
tau.sq.beta <- c(0.6, 1.5, 0.4, 0.5, 0.3)
# Detection
alpha.mean <- c(0, 1.2, -0.5)
tau.sq.alpha <- c(1, 0.5, 1.3)
p.det <- length(alpha.mean)
# Random effects
psi.RE <- list(levels = 15,
sigma.sq.psi = 0.7)
p.RE <- list(levels = 20,
sigma.sq.p = 0.5)
# 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]))
}
# Number of spatial factors for each SVC
n.factors <- 2
# The intercept and first two covariates have spatially-varying effects
svc.cols <- c(1, 2, 3)
p.svc <- length(svc.cols)
q.p.svc <- n.factors * p.svc
# Spatial decay parameters
phi <- runif(q.p.svc, 3 / 0.9, 3 / 0.1)
# A length N vector indicating the proportion of simulated locations
# that are within the range for a given species.
range.probs <- runif(N, 0.4, 1)
factor.model <- TRUE
cov.model <- 'spherical'
sp <- TRUE
dat <- simMsOcc(J.x = J.x, J.y = J.y, n.rep = n.rep, N = N, beta = beta, alpha = alpha,
psi.RE = psi.RE, p.RE = p.RE, phi = phi, sp = sp, svc.cols = svc.cols,
cov.model = cov.model, n.factors = n.factors,
factor.model = factor.model, range.probs = range.probs)
y <- dat$y
X <- dat$X
X.re <- dat$X.re
X.p <- dat$X.p
X.p.re <- dat$X.p.re
coords <- dat$coords
range.ind <- dat$range.ind
# Prep data for spOccupancy -----------------------------------------------
# Occurrence covariates
occ.covs <- cbind(X, X.re)
colnames(occ.covs) <- c('int', 'occ.cov.1', 'occ.cov.2', 'occ.cov.3',
'occ.cov.4', 'occ.factor.1')
# Detection covariates
det.covs <- list(det.cov.1 = X.p[, , 2],
det.cov.2 = X.p[, , 3],
det.factor.1 = X.p.re[, , 1])
# Data list
data.list <- list(y = y, coords = coords, occ.covs = occ.covs,
det.covs = det.covs, range.ind = range.ind)
# 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 / 1, b = 3 / .1))
inits.list <- list(alpha.comm = 0,
beta.comm = 0,
beta = 0,
alpha = 0,
tau.sq.beta = 1,
tau.sq.alpha = 1,
z = apply(y, c(1, 2), max, na.rm = TRUE))
# Tuning
tuning.list <- list(phi = 1)
# Number of batches
n.batch <- 2
# Batch length
batch.length <- 25
n.burn <- 0
n.thin <- 1
n.samples <- n.batch * batch.length
# Note that this is just a test case and more iterations/chains may need to
# be run to ensure convergence.
out <- svcMsPGOcc(occ.formula = ~ occ.cov.1 + occ.cov.2 + occ.cov.3 +
occ.cov.4 + (1 | occ.factor.1),
det.formula = ~ det.cov.1 + det.cov.2 + (1 | det.factor.1),
data = data.list,
inits = inits.list,
n.batch = n.batch,
n.factors = n.factors,
batch.length = batch.length,
std.by.sp = TRUE,
accept.rate = 0.43,
priors = prior.list,
svc.cols = svc.cols,
cov.model = "spherical",
tuning = tuning.list,
n.omp.threads = 1,
verbose = TRUE,
NNGP = TRUE,
n.neighbors = 5,
search.type = 'cb',
n.report = 10,
n.burn = n.burn,
n.thin = n.thin,
n.chains = 1)
#> ----------------------------------------
#> Preparing to run the model
#> ----------------------------------------
#> No prior specified for sigma.sq.psi.ig.
#> Setting prior shape to 0.1 and prior scale to 0.1
#> No prior specified for sigma.sq.p.ig.
#> Setting prior shape to 0.1 and prior scale to 0.1
#> phi is not specified in initial values.
#> Setting initial value to random values from the prior distribution
#> lambda is not specified in initial values.
#> Setting initial values of the lower triangle to random values from a standard normal
#> sigma.sq.psi is not specified in initial values.
#> Setting initial values to random values between 0.5 and 10
#> sigma.sq.p is not specified in initial values.
#> Setting initial values to random values between 0.5 and 10
#> w is not specified in initial values.
#> Setting initial value to 0
#> ----------------------------------------
#> Building the neighbor list
#> ----------------------------------------
#> ----------------------------------------
#> Building the neighbors of neighbors list
#> ----------------------------------------
#> ----------------------------------------
#> Model description
#> ----------------------------------------
#> Spatial Factor NNGP Multispecies Occupancy Model with Polya-Gamma latent
#> variable fit with 100 sites and 6 species.
#>
#> Samples per chain: 50 (2 batches of length 25)
#> Burn-in: 0
#> Thinning Rate: 1
#> Number of Chains: 1
#> Total Posterior Samples: 50
#>
#> Number of spatially-varying coefficients: 3
#> Using the spherical spatial correlation model.
#>
#> Using 2 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: 2 of 2, 100.00%
summary(out)
#>
#> Call:
#> svcMsPGOcc(occ.formula = ~occ.cov.1 + occ.cov.2 + occ.cov.3 +
#> occ.cov.4 + (1 | occ.factor.1), det.formula = ~det.cov.1 +
#> det.cov.2 + (1 | det.factor.1), data = data.list, inits = inits.list,
#> priors = prior.list, tuning = tuning.list, svc.cols = svc.cols,
#> cov.model = "spherical", NNGP = TRUE, n.neighbors = 5, search.type = "cb",
#> std.by.sp = TRUE, n.factors = n.factors, n.batch = n.batch,
#> batch.length = batch.length, accept.rate = 0.43, n.omp.threads = 1,
#> verbose = TRUE, n.report = 10, n.burn = n.burn, n.thin = n.thin,
#> n.chains = 1)
#>
#> Samples per Chain: 50
#> Burn-in: 0
#> Thinning Rate: 1
#> Number of Chains: 1
#> Total Posterior Samples: 50
#> Run Time (min): 0.0036
#>
#> ----------------------------------------
#> Community Level
#> ----------------------------------------
#> Occurrence Means (logit scale):
#> Mean SD 2.5% 50% 97.5% Rhat ESS
#> (Intercept) 0.1338 0.3759 -0.5556 0.1777 0.7604 NA 15
#> occ.cov.1 0.1620 0.4918 -0.8052 0.1975 1.0177 NA 50
#> occ.cov.2 0.3094 0.5008 -0.4394 0.2939 1.2044 NA 13
#> occ.cov.3 -0.1359 0.2982 -0.7875 -0.0717 0.2510 NA 50
#> occ.cov.4 0.4752 0.4720 -0.5293 0.5186 1.2438 NA 20
#>
#> Occurrence Variances (logit scale):
#> Mean SD 2.5% 50% 97.5% Rhat ESS
#> (Intercept) 0.7066 0.9891 0.0885 0.4853 1.8641 NA 26
#> occ.cov.1 2.0361 2.6231 0.0829 1.4020 11.7037 NA 11
#> occ.cov.2 1.0506 0.8865 0.1438 0.6425 3.0772 NA 8
#> occ.cov.3 0.4687 0.5575 0.0348 0.2055 1.9339 NA 30
#> occ.cov.4 0.7757 0.5387 0.1359 0.6650 2.2368 NA 50
#>
#> Occurrence Random Effect Variances (logit scale):
#> Mean SD 2.5% 50% 97.5% Rhat ESS
#> occ.factor.1 1.4277 0.825 0.6821 1.281 3.5024 NA 11
#>
#> Detection Means (logit scale):
#> Mean SD 2.5% 50% 97.5% Rhat ESS
#> (Intercept) -0.2111 0.3350 -0.8986 -0.1988 0.4549 NA 20
#> det.cov.1 1.2091 0.3904 0.2939 1.2658 1.7475 NA 29
#> det.cov.2 -0.3346 0.4581 -1.1585 -0.3574 0.3473 NA 30
#>
#> Detection Variances (logit scale):
#> Mean SD 2.5% 50% 97.5% Rhat ESS
#> (Intercept) 0.7309 0.7524 0.0593 0.4639 2.3337 NA 50
#> det.cov.1 0.5192 0.4125 0.0898 0.4007 1.7534 NA 15
#> det.cov.2 1.9783 1.8796 0.3982 1.5197 6.9263 NA 50
#>
#> Detection Random Effect Variances (logit scale):
#> Mean SD 2.5% 50% 97.5% Rhat ESS
#> det.factor.1 0.8425 1.0803 0.2901 0.5295 3.7496 NA 12
#>
#> ----------------------------------------
#> Species Level
#> ----------------------------------------
#> Occurrence (logit scale):
#> Mean SD 2.5% 50% 97.5% Rhat ESS
#> (Intercept)-sp1 -0.0617 0.3948 -0.7151 -0.0405 0.7774 NA 12
#> (Intercept)-sp2 0.1264 0.4375 -0.8716 0.1849 0.9008 NA 20
#> (Intercept)-sp3 1.0595 0.3529 0.3421 1.0811 1.6820 NA 16
#> (Intercept)-sp4 0.1968 0.5551 -0.8065 0.2106 1.0716 NA 13
#> (Intercept)-sp5 0.0138 0.5436 -0.8385 -0.1192 1.1352 NA 8
#> (Intercept)-sp6 -0.4851 0.6400 -1.8624 -0.4110 0.5401 NA 7
#> occ.cov.1-sp1 0.8132 0.3558 0.0796 0.8084 1.5059 NA 17
#> occ.cov.1-sp2 1.8693 0.8767 0.6143 1.8706 3.4065 NA 5
#> occ.cov.1-sp3 -0.6044 0.5323 -1.6412 -0.6105 0.2795 NA 10
#> occ.cov.1-sp4 0.2029 0.5443 -0.8900 0.2072 1.2800 NA 15
#> occ.cov.1-sp5 -1.0498 0.5780 -2.0880 -1.1081 0.0911 NA 7
#> occ.cov.1-sp6 -0.9130 0.8326 -2.3599 -0.8842 0.4221 NA 6
#> occ.cov.2-sp1 -0.2460 0.3433 -0.8782 -0.2813 0.3242 NA 16
#> occ.cov.2-sp2 1.2617 0.7007 0.2641 1.1480 2.6105 NA 6
#> occ.cov.2-sp3 -0.2980 0.4040 -1.2729 -0.2965 0.3157 NA 13
#> occ.cov.2-sp4 0.0716 0.7531 -1.1401 0.1241 1.2803 NA 6
#> occ.cov.2-sp5 0.4229 0.6792 -0.9547 0.5921 1.3940 NA 4
#> occ.cov.2-sp6 1.0300 0.9712 -0.2789 0.7881 2.8925 NA 4
#> occ.cov.3-sp1 -0.3690 0.3907 -1.1499 -0.3632 0.4186 NA 9
#> occ.cov.3-sp2 -0.1767 0.3967 -0.7965 -0.1794 0.6169 NA 13
#> occ.cov.3-sp3 -0.1622 0.3956 -1.0984 -0.1352 0.4404 NA 27
#> occ.cov.3-sp4 0.0610 0.3703 -0.6536 0.0478 0.6922 NA 20
#> occ.cov.3-sp5 0.4767 0.4282 -0.2291 0.4978 1.1959 NA 14
#> occ.cov.3-sp6 -0.4394 0.4218 -1.3001 -0.4020 0.2801 NA 26
#> occ.cov.4-sp1 1.2100 0.4379 0.3227 1.2692 1.9575 NA 20
#> occ.cov.4-sp2 0.7036 0.4814 -0.1472 0.6653 1.5147 NA 32
#> occ.cov.4-sp3 -0.4339 0.4008 -1.2405 -0.3963 0.1977 NA 10
#> occ.cov.4-sp4 0.6646 0.7391 -0.5934 0.7504 1.9055 NA 9
#> occ.cov.4-sp5 0.1984 0.5838 -0.7526 0.1896 1.1998 NA 8
#> occ.cov.4-sp6 0.5586 0.6231 -0.4614 0.5504 1.7744 NA 9
#>
#> Detection (logit scale):
#> Mean SD 2.5% 50% 97.5% Rhat ESS
#> (Intercept)-sp1 0.3236 0.2999 -0.2187 0.3358 0.8045 NA 16
#> (Intercept)-sp2 0.0021 0.3294 -0.4964 -0.0743 0.6897 NA 14
#> (Intercept)-sp3 0.4706 0.2972 -0.0702 0.3917 1.0476 NA 28
#> (Intercept)-sp4 -0.8966 0.4913 -1.7372 -0.8969 0.2251 NA 7
#> (Intercept)-sp5 -0.2434 0.3758 -0.7516 -0.3091 0.7650 NA 7
#> (Intercept)-sp6 -0.5790 0.4636 -1.4339 -0.6353 0.2427 NA 10
#> det.cov.1-sp1 0.5841 0.2486 0.1185 0.5616 1.0818 NA 23
#> det.cov.1-sp2 2.3511 0.6082 1.5006 2.3574 3.6214 NA 8
#> det.cov.1-sp3 0.7120 0.1799 0.3910 0.6948 1.0739 NA 37
#> det.cov.1-sp4 1.5748 0.4412 0.6813 1.5896 2.2156 NA 10
#> det.cov.1-sp5 1.0128 0.2496 0.6054 0.9720 1.4247 NA 39
#> det.cov.1-sp6 1.2430 0.3091 0.7346 1.2288 1.8621 NA 25
#> det.cov.2-sp1 -0.6842 0.2725 -1.1334 -0.6851 -0.2582 NA 18
#> det.cov.2-sp2 -1.8171 0.5731 -2.7659 -1.7836 -0.8069 NA 7
#> det.cov.2-sp3 -0.8671 0.1768 -1.1868 -0.8598 -0.5505 NA 24
#> det.cov.2-sp4 -0.9432 0.3573 -1.6397 -0.9256 -0.3841 NA 6
#> det.cov.2-sp5 0.3740 0.2372 -0.0360 0.3409 0.7937 NA 50
#> det.cov.2-sp6 1.4679 0.5899 0.3332 1.4857 2.8287 NA 9
#>
#> ----------------------------------------
#> Spatial Covariance
#> ----------------------------------------
#> Mean SD 2.5% 50% 97.5% Rhat ESS
#> phi-1-(Intercept) 19.8069 7.4449 8.0307 19.1328 29.1440 NA 5
#> phi-2-(Intercept) 5.7250 3.4749 3.1383 4.3578 12.8811 NA 2
#> phi-1-occ.cov.1 19.3000 4.3680 10.8260 18.8028 26.0103 NA 33
#> phi-2-occ.cov.1 17.2330 7.4870 6.4595 17.1046 27.7985 NA 4
#> phi-1-occ.cov.2 16.2955 5.7960 6.3273 15.8857 27.0701 NA 7
#> phi-2-occ.cov.2 16.3754 6.3160 7.9027 15.6796 26.8365 NA 14