computeDic.Rd
This function computes the Deviance Information Criterion (DIC) of a
fitmodel
from a MCMC sample.
computeDic(trace, fitmodel, initState, data, margLogLike = dTrajObs, ...)
either a data.frame
or mcmc
object. Must contain
one column with the posterior logLikelihood
.
a fitmodel
object
named numeric vector. Initial values of the state
variables. Names should match fitmodel$stateNames
.
data frame. Observation times and observed data. The time column
must be named "time"
and the observation column must be named
"obs"
.
R-function to compute the marginal log-likelihood of
theta
.
further arguments to be passed to margLogLike
a list of 5 elements:
DIC
value of the DIC
thetaBar
mean posterior of theta
logLikeThetaBar
log-likelihood of thetaBar
DThetaBar
deviance of thetaBar
pD
effective number of parameters