p_from_r: p_from_r

View source: R/critical_r.R

p_from_rR Documentation

p_from_r

Description

Two-sided p values for a matrix of correlation coefficients, using the null distribution appropriate to the coefficient. Used by the false discovery rate criteria, which need a p value for every screened window.

Usage

p_from_r(r, n, cor_method = "pearson", df_adjust = 0)

Arguments

r

matrix or vector of correlation coefficients

n

number of observations

cor_method

"pearson", "spearman" or "kendall"

df_adjust

degrees of freedom to subtract beyond the usual two, used for partial correlations where a control variable is removed

Value

an object of the same shape as r, containing p values


dendroTools documentation built on Nov. 23, 2026, 9:07 a.m.