calcdicExtern {bayespref}R Documentation

Calculates DIC

Description

This function calculates the DIC score for an object return by bayesPref.

Usage

calcdicExtern(pData = NULL, prefres = NULL, pops = TRUE, 
dicburn = 0, estip = TRUE, measure = "median", constrainP = NULL)

Arguments

pData

A matrix of count data, rows are replicates or individuals and columns are categories.

prefres

An object returned by bayesPref.

pops

A Boolean indicating whether the first column of the matrix are values indicating populations.

dicburn

A value indicating the number of burnin samples discarded for DIC calculation.

estip

A boolean indicating whether to attempt to estimate individual preferences or only estimate population preference (the latter used a multivariate Polya).

measure

Indicates whether the "mean" or "median" is used for calculating DIC.

constrainP

A vector with one entry per population giving the group each population belongs to.

Author(s)

Zachariah Gompert zgompert@uwyo.edu, James A. Fordyce jfordyce@utk.edu

Examples

## Not run: 
data(YGGV)
res <- bayesPref(pData=YGGV,mcmcL=1000)
calcdicExtern(pData=YGGV,prefres=res,pops=TRUE,dicburn=100) 

## End(Not run)

[Package bayespref version 1.0 Index]