View source: R/posteriorSummaryOfTheta.R
posteriorSummaryOfSampleOccupancy | R Documentation |
Estimates the posterior mean, median, and 95% credible limits for a multi-scale occupancy model's sample-specific occurrence probabilities.
posteriorSummaryOfSampleOccupancy(fit, burnin = 1, mcError = FALSE)
fit |
object of class occModel that contains data and previous state of the model's Markov chain |
burnin |
initial no. iterations of Markov chain to be omitted from calculations |
mcError |
logical switch to estimate Monte Carlo standard errors |
This function estimates the posterior mean, median, and 95% credible limits of the sample-specific occurrence probabilities of a multi-scale occupancy model.
Computes estimates of summary statistics for a multi-scale occupancy model's sample-occupancy probabilities. If mcError
=TRUE, the Monte Carlo standard errors of these estimates are computed. All posterior summaries are returned in a list.
data(gobyDetectionData)
detections = occData(gobyDetectionData, "site", "sample")
data(gobySurveyData)
gobySurveyData = scaleData(gobySurveyData) # center and scale numeric covariates
fit1 = occModel(formulaSite = ~ veg,
formulaSiteAndSample = ~ sal + twg,
formulaReplicate = ~ sal + fish,
detectionMats = detections,
siteData = gobySurveyData,
niter = 1100,
niterInterval = 100,
siteColName = 'site',
)
theta = posteriorSummaryOfSampleOccupancy(fit1, burnin=100)
plot(gobySurveyData[, 'sal'], theta$median[,1])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.