A sub-function of EWAS_QC that
tests if the reported p-values match the p-value that can be
derived from the effect-size and standard error values.
Aberrations between these indicate that the p-values have been
adjusted, or that there is some other problem with the data.
It also creates a plot of reported vs. expected p-values that
shows the correlation.
P_correlation(dataset,
plot_correlation = TRUE,
plot_if_threshold = FALSE,
threshold_r = 0.99,
high_quality_plots = FALSE,
save_name = "dataset",
header_translations, ...)P_correlation returns a single numeric value,
representing the correlation between reported and expected
p-values.
a data frame with the columns BETA (effect size),
SE (standard error), and P_VAL (p value). If
the column names differ from the above, the argument
header_translations can be used to translate them.
logical, determines whether a graph is made of reported vs. expected p values.
logical. If TRUE, the plot is only generated if the
p-value correlation is below the specified threshold.
numeric. If the p-value correlation is below this, a warning is generated.
logical. Setting this to TRUE will save the graph as a high-resolution tiff image.
character string used for the output file. Do not add an
extension; P_correlation will do so automatically.
a translation table for the header of dataset. See
translate_header for details.
arguments passed to the generic plot function.
P_correlation is primarly a subfunction of
EWAS_QC, but it can be used separately.