pvals | R Documentation |
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.
pvals(bk, B, thresh.alpha = 1)
## S3 method for class 'perm'
pvals(bk, B, thresh.alpha = 1)
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. |
Given a testing set B, return the p-values for the opposite side. This is an S3 method that is implemented by all backends.
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.
perm
: Implementation for sum of squared correlations under independent Gene and SNP sets.
Uses the permutation moments approximation.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.