Makes a QQ-plot for a set of values hypothesized to follow a uniform distribution (e.g., p-values).

make_qq_plot(p_values, ci_level = 0.95, point_col = "royalblue4", alpha = 0.9)

Arguments

p_values

a vector values -- hypothesized to follow a uniform distribution -- from which to construct the QQ-plot. This vector typically will be a set of p-values.

ci_level

level of the pointwise confidence band (default 0.95)

point_col

color of the plotted points

alpha

transparency of the plotted points

Value

a ggplot object containing the QQ-plot

Examples

set.seed(4)
p_vals <- runif(5000)
make_qq_plot(p_vals)