plotw: Plot for the conflict of evidence parameters w1 and w2

View source: R/plotw.R

plotwR Documentation

Plot for the conflict of evidence parameters w1 and w2

Description

Conflict of evidence plot: this plot displays the posterior distribution of the study's weights. If split.w = TRUE, two weights (w1 and w2) are shown. These weights indicate potential conflict of evidence of the studies. The weight w1 indicates deviations with respect to the specificity and w2 to the sensitivity. If split.w = FALSE, a single weight w is plotted.

Usage

plotw(
  m,
  group = NULL,
  study.names = NULL,
  title = "Posterior quantiles (25%, 50%, 75%)",
  group.colors = c("blue", "red"),
  x.lab = "Variance inflation factor (1/w)"
)

Arguments

m

The object generated by metadiag. The model object must be fitted with the option re = "sm".

group

An optional argument which is a variable name indicating a group factor. If set, then the plot is colored by groups.

study.names

An optional argument specifying the column name in m$data containing study names. If provided, these names are used on the study axis instead of numeric study IDs.

title

The title of the plot.

group.colors

A character vector with two color names.

x.lab

Text with the label of the x-axis. Default is "Variance inflation factor (1/w)".

See Also

metadiag.

Examples


## Not run: 
data(ep)
ep$design = factor(ep$d1,labels = c("prospective", "retrospective"))
m.ep <- metadiag(ep, re = "sm", re.model = "SeSp",
                split.w = TRUE,
                df.estimate = TRUE)

plotw(m.ep)

# split.w = FALSE case
m.ep2 <- metadiag(ep, re = "sm", re.model = "SeSp",
                 split.w = FALSE)
plotw(m.ep2)

## End(Not run)


bamdit documentation built on March 19, 2026, 1:06 a.m.