addSurv: Calculate hazard ratio

Description Usage Arguments Value See Also Examples

Description

Calculate hazard ratio of miRNAs or mRNAs from a corObject using a Cox proportional hazards regression.

Usage

1
addSurv(obj, dataset, time, event, adjusting = NULL)

Arguments

obj

a corObject

dataset

"miRNA" or "mRNA".

time

colname of the time column in the pheno.miRNA or pheno.mRNA slot

event

colname of the event column in the pheno.miRNA or pheno.mRNA slot

adjusting

(optional) colname of the adjusting variables that will be used

Value

a corObject with a diffexp.miRNA or diffexp.mRNA slot added. The slot is a data.frame in which row names are the names of the miRNAs or mRNAs and has the following columns:

See Also

package:survival, coxph, plotSurv

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
data(miRNA)
data(mRNA)
data(pheno.miRNA)
data(pheno.mRNA)

minimal<-new("corObject",dat.miRNA=miRNA,dat.mRNA=mRNA,
	pheno.miRNA=pheno.miRNA,pheno.mRNA=pheno.mRNA)

minimal@pheno.miRNA$time<-runif(nrow(minimal@pheno.miRNA),1,20)
minimal@pheno.miRNA$event<-rbinom(nrow(minimal@pheno.miRNA),1,0.5)
minimal@pheno.miRNA$a1<-rnorm(nrow(minimal@pheno.miRNA),1,0.5)
minimal@pheno.miRNA$a2<-rnorm(nrow(minimal@pheno.miRNA),1,0.5)


#plotSurv(minimal, "miRNA", "hsa-let-7c", "time", "event")

minimal.diffexp<-addSurv(minimal, "miRNA", "time", "event",c("a1","a2"))
head(minimal.diffexp@diffexp.miRNA)
minimal.diffexp<-addSurv(minimal, "miRNA", "time", "event",c("a1"))
head(minimal.diffexp@diffexp.miRNA)
minimal.diffexp<-addSurv(minimal, "miRNA", "time", "event")
head(minimal.diffexp@diffexp.miRNA)

mariavica/mircomb documentation built on Feb. 3, 2020, 2:28 a.m.