intervention_viz: Visualize individual treatment results.

Description Usage Arguments Value Examples

View source: R/intervention_viz.r

Description

Plots three graphs using data from a net.tab() object. In the first graph, the average outcome or average events per person (depending on type of response data) is plotted against treatment. In the second graph, the number of studies which examined each treatment is plotted. In the third graph, the number of events relative to the total number of patients for each treatment across all studies. Note that the third graph does not appear for continuous response data. The number of comparisons made can be controlled with the cutoff and metric parameters. Default value for these arguments are all ptreatments, and the number of patients (descending), respectively. The type.outcome parameter must be specified, which is the same as given in the net.tab documentation.

Usage

1
intervention_viz(data, cutoff, type.outcome, metric)

Arguments

data

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

cutoff

The number of pairwise treatments to be plotted. Default is all. If a different value is specified, the cutoff in combination with the specified metric is used to select treatments.

type.outcome

A string which denotes the type of response variable examined in each study, similar to the net.tab specification. Options are 'binary' (binary data with no follow-up), 'rate' (count data with person-time-at-risk), 'rate2' (binary data with follow-up time) and 'continuous'

metric

A string which specifies the metric used to determine which pairwise treatments to be included based on cutoff. The default metric used is the maximum number of patients. Any numeric column name of the net.tab object may be used for this parameter.

Value

Two or three ggplot objects.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## 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")
intervention_viz(summary_diabetes, type.outcome = "rate2")

## End(Not run)

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