AE: input parameter determining which adverse events to show in the plot. This can be a numeric scalar specifying the number of top (in terms of computed LRT values) adverse events to show. Alternatively, it can be a character vector, specifying the exact adverse events to show. It can also be a vector of patterns to match (ignores cases) against the full names of all available adverse events, provided grep is set to TRUE. Defaults to adverse events corresponding to the top M pairs where M = max(number of possible pairs, 50). Set AE = Inf to force display of all adverse events.
Drug: input parameter determining which drugs to show in the plot. This can be a numeric scalar specifying the number of top (in terms of computed LRT values) drugs to show. Alternatively, it can be a character vector, specifying the exact drugs to show. It can also be a vector of patterns to match (ignores cases) against the full names of all available drugs, provided grep is set to TRUE. Defaults to drugs corresponding to the top M pairs where M = max(number of possible pairs, 50). Set Drug = Inf to force display all drugs.
grep: logical. Match patterns against the supplied AE or Drug names? Ignores if neither AE nor Drug is a character vector.
fill_measure: Measure to govern the filling color in each cell (in heatmap) or bar (in barplot) or circle/bubble (in bubbleplot) for each drug/AE combination. Defaults to "p_value". Available choices are: "p.value", "lrstat", and "n".
show_n: logical. show the sample size as inscribed text on each cell?
show_lrstat: logical. show the computed LRT statistic (on log-scale) inscribed text on each cell?
show_p_value: logical. show the computed p-value as inscribed text on each cell?
p_value_lower, p_value_upper: lower and upper limits on the computed p-values to display on the plot.
lrstat_lower, lrstat_upper: lower and upper limits on the computed LRT values to display on the plot.
n_lower, n_upper: lower and upper limits on the computed sample sizes to display on the plot.
arrange_alphabetical: logical. should the rows (AEs) and columns (Drugs) be arranged in alphabetical orders? Defaults to FALSE, in which case the orderings of the computed LRT values are used.
remove_outside: logical. Should the values for pairs with p-value, LRT statistics or sample sizes falling outside of the provided ranges through p_value_lower, p_value_upper etc., be replaced with NA? Defaults to FALSE. Setting this to TRUE may help distinguish drugs or AEs which has some pairs falling within and some pairs falling outside of the provided ranges better.
digits: numeric. Number of decimal places to show on the inscribed texts on the plot.
border_color: character string. Specifies the border color of cells/bars.
fill_gradient_range: character vector. Specifies the range of gradient colors used for fill_measure. Passed into the colours argument of scale_fill_gradientn from ggplot2.
...: Other arguments. Currently ignored
x_axis_measure: measure to show on the x-axis of the (horizontal) bar plots. Defaults to "lrstat" available choices are "lrstat", "p_value" and "n".
Drug_nrow: Number of rows in the panels for Drugs for the barplots.
x_axis_logscale: logical. Should the x axis measure in the bar plot or the bubble plot be log transformed (more precisely, "log1p" transformed with the function f(x) = log(1 + x))? Defaults to TRUE.
size_measure: measure to govern sizes of the circles in the bubble plot. Defaults to "n". Available choices are "lrstat", "p_value" and "n".
size_logscale: logical. Should the circle size measure in the the bubble plot be log transformed (more precisely, "log1p" transformed with the function f(x) = log(1 + x)). Defaults to TRUE.
Returns
A ggplot object.
Examples
# 500 bootstrap iterations (nsim) in the example below# are for quick demonstration only --# we recommended setting nsim to 10000 (default) or biggertest1 <- pvlrt(statin46, nsim =500)bubbleplot_pvlrt(test1)heatmap_pvlrt(test1)barplot(test1)