Description Usage Arguments Details See Also
Extract the results of a network meta-analysis from a mtc.results
object
1 | extractMTCResults(res, resultsFile, includesPlacebo = FALSE, ...)
|
res |
A |
resultsFile |
A character string indicating the path to the excel file where the results should be saved. |
includesPlacebo |
Logical indicating whether the network includes placebo. This requires slightly different handling internally as placebo is always the comparator and never the intervention |
... |
Additional arguments passed to underlying extractor functions, particularly calcAllPairs, nameTreatments and makeTab |
This function takes an object of class mtc.result
and
extracts the results for all pairwise treatment comparisons in the network.
The results are returned as a data frame. This function is a wrapper that
calls a series of other functions in the right order to do the actual work.
calcAllPairs calculates all pairwise treament comparisons
in the network using relative.effect
from the gemtc package
extractComparison separates out the which pair of treatments are being compared
nameTreatments matches the numbered treatment ID used by mtc.run to human readable treatment names
makeTab produces a square grid of all pairwise treatment comparisons in the network. The results are presented for column versus row. This is a common approach to reporting MTC results.
extractModelFit Extracts and returns model comparison statistics such as DIC, pD and Dbar
The underlying functions can be used directly provided this order is maintained however this should not usually be necessary. If you take this approach you will also need to save all the respective outputs appropriately.
The ...
can be used to pass arguments to the underlying functions.
The following arguments in particular will be required in almost all cases:
expon
Logical indicating whether the results should be exponentiated
or not. If your analysis is based on log hazard ratio or log odds ratio etc
then set this to TRUE to get the results as the corresponding hazard ratio
or odds ratio. Passed to calcAllPairs
coding
A data frame with two columns 'id' and 'description'. 'id'
must be the treatment id numbers corresponding to the way the treatments
were coded in the network. 'description' should be the name of the
treatment. An optional third column named 'Order' may also be provided. If
present this controls the order in which treatments are presented in the
output. The values should be a sequence of numbers indicating the order in
which the treatments should be sorted. If the 'Order' column is present
then reportOrder
should be set to 'custom'. Passed to makeTab
reportOrder
A character string indicating whether the treatments
should be reported in the order the order they were provided (default) or
if a custom order is required. Acceptable values are 'default' or 'custom'.
If this is set to 'custom' then coding
must contain a column named
'Order'. See above. Passed to makeTab
mtc.run
,
calcAllPairs
, extractComparison
,
nameTreatments
, makeTab
,
extractModelFit
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.