p_adjust: Adjust P-values for Multiple Comparisons

View source: R/methods.R

p_adjustR Documentation

Adjust P-values for Multiple Comparisons

Description

Identical to stats::p.adjust, but includes method = "oleson"

Usage

p_adjust(p, method = "oleson", n = length(p), alpha = 0.05, df, rho, cores = 0)

Arguments

p

numeric vector of p-values (possibly with NAs).

method

correction method, a character string. Can be any of the methods in p.adjust.methods, with the additional value method = "oleson"

n

number of comparisons, must be at least length(p); only set this (to non-default) when you know what you are doing!

alpha

adjustment to be made with method oleson

df

degrees of freedom, if using method = "oleson"

rho

AR1 correlation coefficient, if using method = "oleson"

cores

number of cores for use in parallel, only valid for method = "oleson". Default is zero, using half of the available cores

Details

This function works identically to the function p.adjust, with the additional option to use method = "oleson". For this option, user must include a value for df, alpha. If method = "oleson" and no value is given for rho, 0.9 will be used. To compute a value for rho from t-statistics, use ar1Solver.

Value

Returns a vector of adjusted p-values just as in p.adjust, but with additional attributes for alphastar and rho.

See Also

ar1Solver


bdots documentation built on Jan. 7, 2023, 1:18 a.m.