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

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/ll.call.R

Description

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

Usage

1
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.

Details

The following methods currently need to be implemented to implement a likelihood/link:

The first two methods can now also be used to selectively apply continuity corrections in case the maximum likelihood estimates are used for other purposes. mtc.arm.mle has an additional k=0.5 argument to specify the correction factor. mtc.rel.mle has arguments correction.force=TRUE to force application of the continuity correction even if unnecessary, correction.type="constant" to specify the type of correction (specify "reciprocal") for a correction proportional to the reciprocal of the size of the other arm, and correction.magnitude=1 to specify the (total) magnitude of the correction. These corrections apply only for count data, and will be ignored for continuous likelihood/links.

Value

The return value of the called function.

Author(s)

Gert van Valkenhoef

See Also

mtc.model

Examples

1
2
3
4
5
6
7
8
9
# 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

Example output

Loading required package: coda
[1] "Hazard Ratio"
      mean         sd 
-1.8562980  0.1118034 

gemtc documentation built on May 15, 2021, 1:07 a.m.