mcmcListExample | R Documentation |
mcmc.list
produced by rjags::coda.samples
This is the output of a basic occupancy model applied to detection/non-detection data for blue ridge salamanders (Eurycea wilderae) in Great Smoky Mountains National Park (MacKenzie et al, 2006 p99). Detections were recorded for 5 visits to each of 39 sites, and the data are the number of visits where the species was detected.
The model has five parameters:
scalar, the probability of occupancy.
p[1,1]
is the probability of detection given presence; p[2,2]
is a dummy variable with values drawn from a Beta(0.5,0.5) distribution; p[1,2]
and p[2,1]
are not defined, so p
is a "ragged array".
a vector of length 39, one value for each site.
scalar, the Freeman-Tukey discrepancy for the observed data.
scalar, the Freeman-Tukey discrepancy for the simulated data.
The number of nodes monitored is 44 (p[1,2]
and p[2,1]
are not monitored).
Three MCMC chains were run, with 1000 adaptation iterations, 1000 burn-in, and 1000 iterations saved per chain after thinning by 10.
data("mcmcListExample")
mcmcListExample
is mcmc.list
object as defined in package coda.
MacKenzie, D I; J D Nichols; A J Royle; K H Pollock; L L Bailey; J E Hines 2006. Occupancy estimation and modeling : inferring patterns and dynamics of species occurrence. Elsevier Publishing.
data(mcmcListExample) str(mcmcListExample) # convert to class mcmcOutput ( mco <- mcmcOutput(mcmcListExample) ) summary(mco) # Extract with "$" p <- mco$p str(p) p[1:5,,] # Elements of p not defined in the model are filled with NAs # "[" with one index, produces new mcmcOutput object head(mco[4:5]) print(mco[c("z[35]", "z[39]")]) # "[" with two indices mco[1:5, "psi"] # First 5 values for psi (chain #1) # "[" with three indices mco[1:5, 2, "psi"] # First 5 values for psi in chain #2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.