calculate_local_consistency: Local Consistency Score

View source: R/RcppExports.R

calculate_local_consistencyR Documentation

Local Consistency Score

Description

C++ implementation of Local Consistency Score algorithm.

Usage

calculate_local_consistency(x, numPermutations, minPermutations, e)

Arguments

x

numeric vector that contains values for shuffling

numPermutations

maximum number of permutations performed in Monte Carlo test for consistency score

minPermutations

minimum number of permutations performed in Monte Carlo test for consistency score

e

stop criterion for consistency score Monte Carlo test: aborting permutation process after observing e random consistency values with more extreme values than the actual consistency value

Value

list with score, p_value, and n components, where score is the raw local consistency score (usually not used), p_value is the associated p-value for that score, obtained by Monte Carlo testing, and n is the number of permutations performed in the Monte Carlo test (the higher, the more significant)

Examples

poor_enrichment_spectrum <- c(0.1, 0.5, 0.6, 0.4,
  0.7, 0.6, 1.2, 1.1, 1.8, 1.6)
local_consistency <- calculate_local_consistency(poor_enrichment_spectrum,
  1000000, 1000, 5)

enrichment_spectrum <- c(0.1, 0.3, 0.6, 0.7, 0.8,
  0.9, 1.2, 1.4, 1.6, 1.4)
local_consistency <- calculate_local_consistency(enrichment_spectrum,
  1000000, 1000, 5)

kkrismer/transite documentation built on Feb. 9, 2024, 3:23 a.m.