mb.update: Update MBNMA to obtain deviance contributions or fitted...

View source: R/run.functions.R

mb.updateR Documentation

Update MBNMA to obtain deviance contributions or fitted values

Description

Update MBNMA to obtain deviance contributions or fitted values

Usage

mb.update(
  mbnma,
  param = "theta",
  n.iter = mbnma$BUGSoutput$n.iter,
  n.thin = mbnma$BUGSoutput$n.thin
)

Arguments

mbnma

An S3 object of class "mbnma" generated by running a time-course MBNMA model

param

A character object that represents the parameter within the model to monitor when updating. Can currently only be used for monitoring fitted values and deviance contributions and so can take either "dev" (for deviance contributions), "resdev" (for residual deviance contributions) or "theta" (for fitted values).

n.iter

The number of iterations to update the model whilst monitoring additional parameters (if necessary). Must be a positive integer. Default is the value used in mbnma.

n.thin

The thinning rate. Must be a positive integer. Default is the value used in mbnma.

Value

A data frame containing posterior means for the specified param at each observation, arm and study.

Examples


# Using the alogliptin dataset
network <- mb.network(alog_pcfb)

# Run Emax model
emax <- mb.run(network, fun=temax())

# Update model for 500 iterations to monitor fitted values
mb.update(emax, param="theta", n.iter=500)

# Update model for 500 iterations to monitor residual deviance contributions
mb.update(emax, param="resdev", n.iter=500)

# Update model for 500 iterations to monitor deviance contributions
mb.update(emax, param="dev", n.iter=500)


MBNMAtime documentation built on Oct. 14, 2023, 5:08 p.m.