findWeights: Finds weights of each level of a factor.

Description Usage Arguments Details Value Author(s) Examples

Description

findWeights returns a list of variances and weights based on the correlation between genes for each level of a factor found in the annotation. This function is typically used to find the weights of each individual in the data set.

Usage

1
findWeights(X, anno, Factor)

Arguments

X

A matrix of gene expression values.

anno

A dataframe or a matrix containing the annotation of arrays in X.

Factor

A character string corresponding to a column name of anno. For all levels of this factor corresponding weights will be calculated.

Details

Note that because calculations of weights include finding correlations between all genes, this function might take some time. Hence, recalculation of weights is not advisable and should be avoided. However often the inverse variances can be used to calculate new weights. In particlular, when W_i denotes the weight of the i^{th} level and V_i the variance as calculated from the gene-gene correlations:

W_i=\frac{\frac{1}{V_i}}{∑_{i=1}^{n}\frac{1}{V_i}}

Value

findWeights returns output of the class Weights. An object of class Weights is a list with the following components:

Author(s)

Saskia Freytag

Examples

1
2
3
4
Y<-simulateGEdata(500, 500, 10, 2, 5, g=NULL, Sigma.eps=0.1, 250, 100, check.input=FALSE)
anno<-as.matrix(sample(1:4, dim(Y$Y)[1], replace=TRUE))
colnames(anno)<-"Factor"
findWeights(Y$Y, anno, "Factor")

PeteHaitch/RUVcorr documentation built on May 8, 2019, 1:31 a.m.