comparison.viz: Visualize pairwise treatment comparisons

Description Usage Arguments Value Examples

View source: R/comparison.viz.r

Description

Plots two graphs from the output of a net.tab() function call. In the first graph, the number of total patients and observed events are plotted for all treatment pairs in the network. This data is pooled from all studies, and organized by each pairwise comparison among treatments of interest. This graph is omitted for continous response data since the number of events is not meaningful for this response type. In the second graph, the number of studies which examined each treatment pair (summed across the network) is plotted as a bar graph. The number of comparisons made can be controlled with the cutoff and metric parameters, as in intervention.viz() Default value for these arguments are all pairwise treatments, and the number of events (descending), respectively.

Usage

1
comparison.viz(data, cutoff, metric)

Arguments

data

The output of the net.tab()function applied to a dataset of interest.

cutoff

The number of pairwise treatments to be plotted. Default is all.

metric

Metric used to determine which pairwise treatments to be included based on cutoff. The default 'cutoff' number of treatments with the highest number of patients. Any numeric column name of the net.tab() object may be used, specified as a string.

Value

One or two ggplot objects.

Examples

1
2
3
4
5
6
7
8
## Not run: 
data("diabetes.sim")
data_diabetes <- data.prep(arm.data = diabetes.sim, varname.t = "Treatment", varname.s = "Study")
summary_diabetes <- net.tab(data = data_diabetes,
                          outcome = "diabetes", N = "n", type.outcome = "rate2", time = "followup")
comparison.viz(summary_diabetes)

## End(Not run)

augustinewigle/StanNet documentation built on July 21, 2020, 12:13 a.m.