compute_NB_DIC {BSTZINB}R Documentation

DIC for BSTNB or BNB fitted objects

Description

Computes DIC for a BSTNB or BNB fitted object

Usage

compute_NB_DIC(y,bstfit,lastit,nchain)

Arguments

y

vector of counts, must be non-negative, the response used for fitting a BSTNB or BSTP model

bstfit

BSTNB or BNB fitted object

lastit

positive integer, size of the chain used to fit BSTZINB

nchain

positive integer, number of chains used to fit BSTZINB

Value

DIC value

Examples

data(simdat)
y <- simdat$y
X <- cbind(simdat$V1,simdat$x)
data(county.adjacency)
data(USAcities)
IAcities <- subset(USAcities,state_id=="IA")
countyname <- unique(IAcities$county_name)
A <- get_adj_mat(county.adjacency,countyname,c("IA"))

res2 <- BSTNB(y, X, A, nchain=3, niter=100, nburn=20, nthin=1)
compute_NB_DIC(y,res2,lastit=(100-20)/1,nchain=3)



[Package BSTZINB version 2.0.0 Index]