mfsurv.stats {BayesMFSurv}R Documentation

mfsurv.stats

Description

A function to calculate the deviance information criterion (DIC) for fitted model objects of class mfsurv for which a log-likelihood can be obtained, according to the formula DIC = -2 * (L - P), where L is the log likelihood of the data given the posterior means of the parameter and P is the estimate of the effective number of parameters in the model.

Usage

mfsurv.stats(object)

Arguments

object

an object of class mfsurv, the output of mfsurv().

Value

list.

Examples

set.seed(95)
bgl <- Buhaugetal_2009_JCR
bgl <- subset(bgl, coupx == 0)
bgl <- na.omit(bgl)
Y   <- bgl$Y
X   <- as.matrix(cbind(1, bgl[,1:7]))
C   <- bgl$C
Z1  <- matrix(1, nrow = nrow(bgl))
Y0  <- bgl$Y0
model1 <- mfsurv(Y ~ X | C ~ Z1, Y0 = Y0,
                N = 50,
                burn = 20,
                thin = 15,
                w = c(0.1, .1, .1),
                m = 5,
                form = "Weibull",
                na.action = 'na.omit')

mfsurv.stats(model1)

[Package BayesMFSurv version 0.1.0 Index]