pvals: Backends : engines for p-value computation.

View source: R/backend.R

pvalsR Documentation

Backends : engines for p-value computation.

Description

A backend is an S3 class which implments the methods pvals, cors and pvals_singleton. Different backends provide p-value computation under different scenarios (e.g. squared vs sum of squared correlations, Indpendence within Gene and SNP's) and may do complicated precomputations on the data matrices (X and Y) behind the scenes. Yet all of them provide a unified interface. The methods below are constructors for the differnt backend objects and return an S3 object which implements pvalue methods listed above.

Usage

pvals(bk, B, thresh.alpha = 1)

## S3 method for class 'perm'
pvals(bk, B, thresh.alpha = 1)

Arguments

bk

An object of class backend

B

A set of either X or Y indices (using global numbering). The method calculates the pvalues from this set to the opposite side.

thresh.alpha

We are only interested in p-values less than thresh.alpha. So the method free to return NA for pvalues > thresh.alpha if it helps with optimization.

Details

Given a testing set B, return the p-values for the opposite side. This is an S3 method that is implemented by all backends.

Value

The result is a vector of p-values of length ncol(X) or ncol(Y) depending on whether B is from Y or X respectively.

Methods (by class)

  • perm: Implementation for sum of squared correlations under independent Gene and SNP sets. Uses the permutation moments approximation.


miheerdew/cbce documentation built on Aug. 28, 2023, 2:18 p.m.