waicTicks: WAIC of Models Fitted to Describe the Infection of Roe Deer...

Description Usage Arguments Value Author(s) References Examples

View source: R/waicTicks.R

Description

This function is used to calculate the WAIC of the models fitted in Bariod et al. (in prep).

Usage

1
waicTicks(mcmcList, TicksData, TicksConst)

Arguments

mcmcList

An object of class mcmc.list containing the results of the fit of a model.

TicksData

The list containing the data passed to nimbleMCMC. WARNING: the function does not check that this list actually corresponds to the list passed to nimbleMCMC and trusts the user.

TicksConst

The list containing the constants passed to nimbleMCMC. WARNING: the function does not check that this list actually corresponds to the list passed to nimbleMCMC and trusts the user.

Value

A list containing the following elements:

lppd

the log predictive pointwise density for each fawn in the dataset

pwaic

the contribution of each fawn to the WAIC in the dataset

waic

the value of the WAIC as well as its standard error

Author(s)

Clement Calenge clement.calenge@ofb.gouv.fr

References

Bariod L., Said S., Calenge C., Chabot S., Badeaud V. \& Bourgoin G. in prep. Infection of Roe Deer Fawns by Ticks from 1992 to 2018 in the Trois-Fontaines Forest (France).

Examples

1
2
3
4
5
6
7
8
## Not run: 
    ## WAIC for the model with humidity
    withHumidity <- waicTicks(resultsModel$samples, TicksData, TicksConst)

    ## WAIC for the model without humidity
    withoutHumidity <- waicTicks(resultsModel0$samples, TicksData0, TicksConst)

## End(Not run)

ClementCalenge/tickTF documentation built on Dec. 17, 2021, 2:06 p.m.