#########################################################################################
#The matrices of interest are of the form (see eq. 15, 18 and 22 Nyangoma et al. (2009))
#########################################################################################
#Examples are:
###################
# 1 binary variable
###################
data.frame(x1=c(1,'b'),x2=c('b','b'))
#####################
# 2 binary variables
#####################
data.frame(x1=c(1,'b','c'),x2=c('b','b','d'),x3=c('c','d','c'))
##########################################
# 3 binary variables
data.frame(x1=c(1,'b','c','d'),x2=c('b','b','e','f'),x3=c('c','e','c','g'),x4=c('d','f','g','d'))
##############################################################################
##############################################################################
# Data # pheno_urine
# the phenotypic information of the urine cancer patients and normal controls.
#####
# I have discretized protein concentration
# concentration<=70 and concentration>70
##########################################
##########################################
#data(pheno_urine)
#PhenoInfo <- pheno_urine
#variables <- c('Tumor','Sex','Protein_concIndex')
#variables=c('Tumor','Sex')
#variables=c('Tumor')
# Tumor must contain characters "c" and "n"
#Protein_concIndex <- pheno_urine[!(pheno_urine$stage == 'late'),]$Protein_conc
#Protein_concIndex[Protein_concIndex<=70] <- 0
#Protein_concIndex[Protein_concIndex>70] <- 1
#Protein_concIndex=as.factor(Protein_concIndex)
#PhenoInfo <- data.frame(pheno_urine[!(pheno_urine$stage == 'late'),],Protein_concIndex)
#FisherInformation(PhenoInfo,variables)
data(liverdata)
data(liver_pheno)
OBJECT=new("aclinicalProteomicsData")
OBJECT@rawSELDIdata=as.matrix(liverdata)
OBJECT@covariates=c("tumor" , "sex")
OBJECT@phenotypicData=as.matrix(liver_pheno)
OBJECT@variableClass=c('numeric','factor','factor')
OBJECT@no.peaks=53
inversefisherinformation <- fisherInformation(OBJECT)
inversefisherinformation
Run the code above in your browser using DataLab