mfsurv.stats: mfsurv.stats

Description Usage Arguments Value Examples

View source: R/bayes.mfsurv.R

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

1
mfsurv.stats(object)

Arguments

object

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

Value

list.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
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)

BayesMFSurv documentation built on Jan. 11, 2020, 9:43 a.m.