if (FALSE) {
# Using the alogliptin dataset
network <- mb.network(alog_pcfb)
# Run Emax model saving predicted means and residual deviance contributions
emax <- mb.run(network, fun=temax(),
parameters.to.save=c("theta", "resdev"), intercept=FALSE)
# Get matrices of observed data
jagsdat <- getjagsdata(network$data.ab)
# Plugin estimation of pD is problematic with non-linear models as it often leads to
#negative values, hence use of pV of pD calculated via Kullback-Liebler divergence as
#other measures for the effective number of parameters
pDcalc(obs1=jagsdat$y, obs2=jagsdat$se,
fups=jagsdat$fups, narm=jagsdat$narm, NS=jagsdat$NS,
theta.result = emax$BUGSoutput$mean$theta,
resdev.result = emax$BUGSoutput$mean$resdev
)
}
Run the code above in your browser using DataLab