Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/sv_identification.R
This function returns a matrix of surrogate variables (sv) using the implementation by Chiesa-Piacentini or the sva method by Leek et al.
1 2 3 4 5 6 |
data |
A SummarizedExpression object |
method |
The method used to identify sv. If missing, the "fve" method will be selected. Otherwise the method "leek" or "be" should be choosen |
th.fve |
This argument sets the threshold of maximum fraction of variance explained (fve) to be used in conjunction with "fve" method; default is 0.95 |
second.var |
A factor or a numeric vector corresponding to an additional variable to take into account during the sv identification. This variable together with 'class' in the data object will be used to design the model matrix (~ class + second.var) |
This function helps the user to identify the appropriate number of sv:
it is possible to select a different strategy to be used by changing the
option in method
argument. Three methods are available:
"be" - this option uses the num.sv
function of sva
package with default parameters;
"leek" - The same of before but with asymptotic approach proposed by Leek;
"fve" - This method is introduced in DaMiRseq
package,
and integrates part
of sva
function with custom code. Briefly, we computed
eigenvalues of data
using code already implemented in sva
function and then, we
calculated the squared
of each eigenvalues. Thus, the ratio between each "squared eigenvalue"
and the sum of them
were calculated. These values represent a surrogate measure of the
"Percentage of
Explained Variance" (pve) obtained by principal component analysis (PCA),
and their cumulative
sum can be used to select sv.
A matrix of sv. A plot with the sv identified by "fve" method is also returned. A red dot shows the maximum number of variables to be included for a specific "fve".
Mattia Chiesa, Luca Piacentini
Jeffrey T. Leek, W. Evan Johnson, Hilary S. Parker, Elana J. Fertig, Andrew E. Jaffe and John D. Storey (2016). sva: Surrogate Variable Analysis. R package version 3.22.0.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.