all_plot function

Plot all effect estimates against p values

Plot all effect estimates against p values

all_plot() generates a scatter plot with effect estimates of all possible models again p values.

all_plot( data, xlabels = c(0, 0.001, 0.01, 0.05, 0.2, 0.5, 1), xlim = c(0, 1), xlab = "P value", ylim = NULL, ylab = NULL, yscale_log = FALSE, title = NULL )

Arguments

  • data: Object from all_cox, all_glm, all_speedglm, or all_glm, including all effect estimate values.
  • xlabels: Numeric vector x-axis tick labels. Default is "c(0, 0.001, 0.01, 0.05, 0.2, 0.5, 1)".
  • xlim: Vector of 2 numeric values for x-axis limits. Default is "c(0, 1)".
  • xlab: Character string for x-axis name. Default is "P value".
  • ylim: Vector of 2 numeric values for y-axis limits.
  • ylab: Character string for y-axis name. Default depends on original model types.
  • yscale_log: TRUE or FALSE to re-scale y-axis to "log10". Default is "FALSE".
  • title: Character for plot title. Default is "NULL".

Returns

A ggplot2 object: scatter plot

Examples

vlist <- c("Age", "Sex", "Married", "BMI", "Education", "Income") results <- all_cox(crude = "Surv(t0, t1, Endpoint) ~ Diabetes", xlist = vlist, data = diab_df) all_plot(results)
  • Maintainer: Zhiqiang Wang
  • License: GPL-2
  • Last published: 2023-03-26

Useful links