Update model fit statistics depending on calculation for pD
changepd(model, jagsdata = NULL, pd = "pv", likelihood = NULL, type = "dose")
A list containing pd
(effective number of parameters calculated using the method
specified in arguments), deviance
(the posterior median of the total residual deviance)
and dic
(the model DIC)
A model object of class "rjags"
A list object containing data used to estimate model
Can take either:
pv
only pV will be reported (as automatically outputted by R2jags
).
plugin
calculates pD by the plug-in
method spiegelhalter2002MBNMAdose. It is faster, but may output negative
non-sensical values, due to skewed deviances that can arise with non-linear models.
pd.kl
calculates pD by the Kullback-Leibler divergence plummer2008MBNMAdose. This
will require running the model for additional iterations but is a more robust calculation for the effective
number of parameters in non-linear models.
popt
calculates pD using an optimism adjustment which allows for calculation
of the penalized expected deviance plummer2008MBNMAdose.
A string indicating the likelihood to use in the model. Can take either "binomial"
,
"normal"
or "poisson"
. If left as NULL
the likelihood will be inferred from the data.
Can take either "dose"
for a dose-response MBNMA or "time"
for a
time-course MBNMA (this accounts for multiple observations within an arm)