WAIC: Widely Applicable Information Criterion (WAIC) of a...

View source: R/WAIC.R

WAICR Documentation

Widely Applicable Information Criterion (WAIC) of a Multi-scale Occupancy Model

Description

Computes the value of WAIC for a fitted multi-scale occupancy model.

Usage

WAIC(fit, burnin = 1)

Arguments

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

Details

This function computes the WAIC value used in model-selection once a multi-scale occupancy model has been fitted using occModel.

Value

value of WAIC and its goodness-of-fit and predictive-variance components.

Examples


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)

RobertDorazio/eDNAoccupancy documentation built on Sept. 5, 2023, 9:57 a.m.