plotWdists: Plot the distribution of the weight of evidence in cases and...

Description Usage Arguments Value Examples

View source: R/plots.R

Description

Plot the distribution of the weight of evidence in cases and in controls

Usage

1
plotWdists(densities, distlabels = c("Crude", "Model-based"))

Arguments

densities

Densities object produced by Wdensities.

distlabels

Character vector of length 2 to be used to label the crude and the model-based curves (in that order).

Value

A ggplot object representing the distributions of crude and model-based weights of evidence in cases and in controls.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(cleveland)
densities <- with(cleveland, Wdensities(y, posterior.p, prior.p))
plotWdists(densities)

# Example which requires fitting a mixture distribution
data(fitonly)
densities <- with(fitonly, Wdensities(y, posterior.p, prior.p))

# truncate spike
plotWdists(densities) + ggplot2::scale_y_continuous(limits=c(0, 0.5))

wevid documentation built on Sept. 12, 2019, 5:04 p.m.