plot_p_histogram | R Documentation |
If no associations are found, by definition the pvalues should come from a uniform distribution. This can be checked with the function below.
plot_p_histogram(
data,
p_value = "p.value",
title.to.plot = "P-values of the association study",
gamma.hat = 1
)
data |
dataframe to use |
p_value |
character string. name of column containing p values |
title.to.plot |
title of the plot to produce |
gamma.hat |
gamma hat to use. Standard set to 1. In future versions, this value could be changed in order to get more accurate detection of associations. |
histogram
# Create random P values, possible result of an association study
pvals_data <- data.frame(
"p.value" = c(runif(1000, 0, .99999), runif(250, 1.0e-11, 1.0e-8))
)
plot_p_histogram(pvals_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.