WAIC | R Documentation |
Computes the value of WAIC for a fitted multi-scale occupancy model.
WAIC(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 WAIC value used in model-selection once a multi-scale occupancy model has been fitted using occModel
.
value of WAIC 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',
)
WAIC(fit1, burnin=100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.