adaptivePermulation: Adaptively calculates permulation p-value for a single...

View source: R/PermulationFuncs.R

adaptivePermulationR Documentation

Adaptively calculates permulation p-value for a single element

Description

Adaptively calculates permulation p-value for a single element

Usage

adaptivePermulation(
  rer,
  permulated_trees,
  observed_stats,
  alpha = 0.05,
  mode = "binary"
)

Arguments

rer

a row matrix for the given element (e.g., a row from the matrix output from getAllResiduals)

permulated_trees

a list containing n sets of permulated trees (e.g., output from generatePermulatedBinPhen)

observed_stats

computed statistics for the observed trait (e.g., output from getAllCor, correlateWithBinaryPhenotype, or correlateWithContinuousPhenotype)

alpha

the significance level to control (default = 0.05)

mode

"binary" for binary permulations, "continuous" for continuous permulations (default = "binary")

Value

out data frame containing permPval (permulation p-value) and the corrected score (negative signifies deceleration, positive signifies acceleration)


nclark-lab/RERconverge documentation built on March 2, 2024, 8:51 a.m.