Learn R Programming

HUM (version 2.0)

CalcGene: Calculate HUM value

Description

This is the auxiliary function of the HUM package. It computes a HUM value for individual feature and returns a “List” object, consisting of HUM value and the best permutation of class labels in “seq” vector. This “seq” vector can be passed to the function CalculateHUM_ROC.

Usage

CalcGene(s_data, seqAll, prodValue)

Arguments

s_data

a list, which contains the vectors of sorted feature values for individual class labels.

seqAll

a numeric matrix of all the permutations of the class labels, where each row corresponds to individual permutation vector.

prodValue

a numeric value, which is the product of the sizes of feature vectors, corresponding to analized class labels.

Value

The data must be provided without missing values in order to process. A returned list consists of the following fields:

HUM

a list of HUM values for the specified number of analyzed features

seq

a list of vectors, each containing the sequence of class labels

Errors

If there exists NA values for features or class labels no HUM value can be calculated and an error is triggered with message “Values are missing”.

Details

This function's main job is to compute the maximal HUM value between the all possible permutations of class labels for individual feature, selected for analysis. See the “Value” section to this page for more details.

References

Li, J. and Fine, J. P. (2008): ROC Analysis with Multiple Tests and Multiple Classes: methodology and its application in microarray studies.Biostatistics. 9 (3): 566-576.

See Also

CalculateHUM_Ex, CalculateHUM_ROC

Examples

Run this code
# NOT RUN {
data(sim)
# Basic example
indexF=3;
indexClass=2;
indexLabel=c("Normal","OrthArthr")
s_data=NULL;
prodValue=1;
for(i in 1:length(indexLabel))
{
  index=which(sim[,indexClass]==indexLabel[i])
  vrem=sort(sim[index,indexF])
  s_data=c(s_data,list(vrem))
  prodValue=prodValue*length(index)
}
len=length(indexLabel)
seqAll=permutations(len,len,1:len)
out=CalcGene(s_data, seqAll, prodValue)
# }

Run the code above in your browser using DataLab