compute_ZINB_DIC {BSTZINB} | R Documentation |
Computes DIC for a BSTZINB fitted object
compute_ZINB_DIC(y,bstfit,lastit,nchain)
y |
vector of counts, must be non-negative, the response used for fitting a BSTZINB model |
bstfit |
BSTZINB fitted object |
lastit |
positive integer, size of the chain used to fit BSTZINB |
nchain |
positive integer, number of chains used to fit BSTZINB |
DIC value
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"))
res3 <- BSTZINB(y, X, A, LinearT=TRUE, nchain=3, niter=100, nburn=20, nthin=1)
compute_ZINB_DIC(y,res3,lastit=(100-20)/1,nchain=3)