personograph-package: Generate personograph plots from data

Description Details See Also Examples

Description

A personograph (Kuiper-Marshall plot) is a pictographic representation of (relative) harm and benefit from an intervention. It is similar to Visual Rx (Cates Plots). Each icon on the grid is colored to indicate whether that percentage of people is harmed by the intervention, would benefit from the intervention, has good outcome regardless of intervention, or bad outcome regardless of intervention. This terminology is similar to that of Uplift Modelling.

Details

The plot function personograph is implemented in such a way that it's easy to just pass a named list of percentages, colors, and an icon. Making it potentially useful for other use cases as well.

The example code will generate the following graph if higher_is_better=F:

Funding & Acknowledgments

This software was commissioned and sponsored by Doctor Evidence. The Doctor Evidence mission is to improve clinical outcomes by finding and delivering medical evidence to healthcare professionals, medical associations, policy makers and manufacturers through revolutionary solutions that enable anyone to make informed decisions and policies using medical data that is more accessible, relevant and readable.

Source & Issues

Source code and issue tracker can be found on Github.

See Also

personograph

uplift

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
# Example data
data <- read.table(textConnection('
          name ev.trt n.trt ev.ctrl n.ctrl
1     Auckland     36   532      60    538
2        Block      1    69       5     61
3        Doran      4    81      11     63
4        Gamsu     14   131      20    137
5     Morrison      3    67       7     59
6 Papageorgiou      1    71       7     75
7      Tauesch      8    56      10     71
'
), header=TRUE)

sm <- "RR" # The outcome measure (either Relative Risk or Odds Ratio)
if (requireNamespace("meta", quietly = TRUE)) { # use meta if available
    ## Calculate the pooled OR or RR point estimate
    m <- with(data, meta::metabin(ev.trt, n.trt, ev.ctrl, n.ctrl, sm=sm))
    point <- exp(m$TE.random) # meta returns random effects estimate on the log scale
} else {
    # Calculated Random Effects RR, using the meta package
    point <- 0.5710092
}

# Approximate the Control Event Rates using a weighted median
cer <- w.approx.cer(data[["ev.ctrl"]], data[["n.ctrl"]])

# Calculate the Intervention Event Rates (IER) from the CER and point estimate
ier <- calc.ier(cer, point, sm)

# Calcaulte the "uplift" statistics
# Note that this depends on the direction of the outcome effect (higher_is_better)
u <- uplift(ier, cer, higher_is_better=FALSE)
plot(u, fig.title="Example", fig.cap="Example")

joelkuiper/personograph documentation built on May 19, 2019, 3 p.m.