drawMeta.metacontM: Plot Function for 'metacontM' Objects

Description Usage Arguments Details Value See Also Examples

Description

Funtion to create forest plots for objects of class 'metabcontM'.

Usage

1
2
3
4
5
6
7
## S3 method for class 'metacontM'
drawMeta(matrix, plotCol = NCOL(matrix$Matrix) + 1, 
        plotHead = "", xlab = NULL, 
        refLine = 0, plotWidth = unit(0.3, "npc"), plotPar = metaPar(), 
        xlog = FALSE, xticks = NULL, boxSize = NULL, align = NULL, 
        clip = c(-Inf, Inf), newpage=TRUE, fit = TRUE, abbreviate = FALSE,
        vpName = "Forest", ...)

Arguments

matrix

An object of class 'metacontM'.

plotCol

Numeric column the confidence interval graph goes into.

plotHead

Heading for the confidence interval graph.

xlab

Vector of length 2 specifying direction of effect as x-axis labels.

refLine

x-axis coordinate for no effect line.

plotWidth

Width of confidence interval graph.

plotPar

Parameters for confidence interval graph, see metaPar.

xlog

If TRUE, x-axis tick marks are exponentiated.

xticks

Optional user-specified x-axis tick marks. Specify NULL to use the defaults, numeric(0) to omit the x-axis.

boxSize

Override the default box size based on precision.

align

Vector giving alignment ("l","r","c") for columns of table.

clip

Lower and upper limits for clipping confidence intervals to arrows.

newpage

Draw plot on a new page and overwrites current device.

fit

Fit plot into current viewport.

abbreviate

Abbreviate names of graphical objects.

vpName

Name of the forest plot viewport.

...

Not used.

Details

This function is more flexible but contains less arguments than the forest.meta method for 'metacont' objects. It requires the user to first produce a dataframe using meta2DF.metacont and convert that into a text matrix using metaDF2Matrix.metacontDF. This process can be done with minimal input from the user, such that only the meta-analysis object is needed to produce the plot.

If more flexibility is required, customisations to the plot can be made at the different stages of the process. Changing the order of studies by rows and adding extra columns from external sources can be done using meta2DF.metacont. Reordering of columns and making new columns from existing columns in the data frame can be done using metaDF2Matrix.metacontDF. Changing the position of the confidence interval graph relative to the other text columns can be done in drawMeta.metacontM.

Value

None

See Also

meta2DF.metacont, metaDF2Matrix.metacontDF

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
### metacont: single group
### simple example
library(meta)
data(Fleiss93cont)
meta1 <- metacont(n.e, mean.e, sd.e, n.c, mean.c,
                  sd.c, data = Fleiss93cont, sm = "SMD")

Data <- meta2DF(meta1) 
matrix <- metaDF2Matrix(Data, 
                        order = c("study", "effect"),
                        roundCols = c("effect" = 2),
                        hgap = 2)  
drawMeta(matrix, 
         plotCol = 3,
         plotHead = "Weighted Mean Difference")  
         
### illustrative example
Data <- meta2DF(meta1, title = "Mental Health Treatment",
                rowOrder = "effect", decreasing = TRUE) 
matrix <- metaDF2Matrix(Data, 
                        order = c("study", "msd.e", "msd.c", "effect", 
                                  "ci", "w.fixed", "w.random"),
                        roundCols = c("effect" = 2, "w.fixed" = 1, 
                                       "w.random" = 1),
                        hgap = c(2, 11), vgap = 5)  
drawMeta(matrix, 
         plotCol = 6,
         plotHead = "Weighted Mean Difference")                  
### metacont: grouped studies
library(meta)
meta <- metacont(n.e, mean.e, sd.e, n.c, mean.c, sd.c,
                 data = Fleiss93cont, sm = "SMD",
                 byvar = c(1,2,1,1,2), bylab = "group") 
Data <- meta2DF(meta, title = "Mental Health Treatment",
                rowOrder = "effect", decreasing = TRUE) 
matrix <- metaDF2Matrix(Data,
                        groupLab = c("Group One", "Group Two", "Overall"), 
                        order = c("study", "msd.e", "msd.c", "effect",
                                  "ci", "w.fixed", "w.random"),
                        roundCols = c("effect" = 2, "w.fixed" = 1, 
                                      "w.random" = 1), 
                        hgap=c(2,11,18), vgap = 5)
drawMeta(matrix, 
         plotCol = 6,
         plotHead = "Weighted Mean Difference")    

pmur002/metaplot documentation built on May 25, 2019, 10:21 a.m.