p_values: Return a data.table with p-values of a tsum_exstra object.

View source: R/p_values.R

p_valuesR Documentation

Return a data.table with p-values of a tsum_exstra object.

Description

Return a data.table with p-values of a tsum_exstra object.

Usage

p_values(
  tsum,
  correction = c("bf", "loci", "samples", "uncorrected"),
  alpha = 0.05,
  only.signif = FALSE,
  modify = FALSE,
  p.matrix = NULL
)

Arguments

tsum

An exstra_tsum object.

correction

Correction method to use. Use "bf" or TRUE for Bonferroni correction, and "uncorrected" or FALSE for no correction. ("bonferroni" is also acceptable). "samples" is Bonferroni correction by the number of tests (samples) at each locus. "loci" is Bonferroni correction by the number of loci.

alpha

Significance level alpha.

only.signif

If TRUE, only return significant results.

modify

If TRUE, will modify the tsum$stats table. Effectively ignored if only.sig == TRUE.

p.matrix

Matrix of p-values for internal use. Should only be used without tsum.

Value

A data.table keyed by "locus" then "sample". Other columns are tsum as calculated by tsum_test, p.value (uncorrected), signif (TRUE if significant after given correction), and p.value.sd, giving the standard deviation of the p-value estimate from the simulation.


bahlolab/exSTRa documentation built on Sept. 17, 2022, 5:08 p.m.