changepd: Update model fit statistics depending on calculation for pD

View source: R/run.functions.R

changepdR Documentation

Update model fit statistics depending on calculation for pD

Description

Update model fit statistics depending on calculation for pD

Usage

changepd(model, jagsdata = NULL, pd = "pv", likelihood = NULL, type = "dose")

Arguments

model

A model object of class "rjags"

jagsdata

A list object containing data used to estimate model

pd

Can take either:

  • pv only pV will be reported (as automatically outputted by R2jags).

  • plugin calculates pD by the plug-in method \insertCitespiegelhalter2002MBNMAdose. 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 \insertCiteplummer2008MBNMAdose. 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 \insertCiteplummer2008MBNMAdose.

likelihood

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.

type

Can take either "dose" for a dose-response MBNMA or "time" for a time-course MBNMA (this accounts for multiple observations within an arm)

Value

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)


MBNMAdose documentation built on Aug. 8, 2023, 5:11 p.m.