View source: R/posteriorPredictiveLoss.R
posteriorPredictiveLoss | R Documentation |
Computes the posterior-predictive loss criterion for a fitted multi-scale occupancy model.
posteriorPredictiveLoss(fit, burnin = 1)
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 |
This function computes the posterior-predictive loss criterion used in model-selection once a multi-scale occupancy model has been fitted using occModel
.
Posterior-predictive loss criterion and its goodness-of-fit and predictive-variance components.
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',
)
posteriorPredictiveLoss(fit1, burnin=100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.