Learn R Programming

gemtc (version 0.7-1)

ll.call: Call a likelihood/link-specific function

Description

GeMTC implements various likelihood/link combinations. Functionality specific to the likelihood/link is handled by methods with names ending in ... This convenience function calls such methods.

Usage

ll.call(fnName, model, ...)

Arguments

fnName
The name of the function to call. See details for available functions.
model
An object of S3 class mtc.model describing a network meta-analysis model, or a list containing elements named 'likelihood' and 'link'.
...
Additional arguments to be passed to the function.

Value

  • The return value of the called function.

encoding

utf8

code

correction.magnitude=1

Details

The following methods currently need to be implemented to implement a likelihood/link:
  • mtc.arm.mle: calculates a (corrected) maximum likelihood estimate for an arm-level effect. Used to generate starting values.
mtc.rel.mle: calculates a (corrected) maximum likelihood estimate for a relative effect. Used to generate starting values. mtc.code.likelihood: generates JAGS/BUGS code implementing the likelihood. scale.log: returns TRUE if plots should use the log scale. scale.name: returns the user-facing name of the outcome metric. scale.limit.inits: returns an upper and lower bound for the initial values, because some initial values might trigger boundary conditions such as probability 0 or 1 for the binomial. required.columns.ab: returns the required columns for arm-based data.

See Also

mtc.model

Examples

Run this code
# The "model" may be a stub.
model <- list(likelihood="poisson", link="log")

ll.call("scale.name", model)
# "Hazard Ratio"

ll.call("mtc.arm.mle", model, c('responders'=12, 'exposure'=80))
#      mean         sd
#-1.8562980  0.1118034

Run the code above in your browser using DataLab