Learn R Programming

valorate (version 1.0-5)

valorate.risk: ESTIMATES RISK

Description

Estimates the risk (hazard ratio), and confidence interval of a 'mutated' group.

Usage

valorate.risk(vro, clusters)

Value

A number representing the relative risk. The confidence interval, p-value, and the coxph model are included as attributes.

Arguments

vro

the valorate object.

clusters

a numerical or logical vector representing the two survival groups encoded in 1/TRUE for those 'mutated' (in the group of interest) or 1/FALSE for those who not. Basically this value is the 'x' vector in the VALORATE re-formulation. See references.

Author

Victor Trevino vtrevino@itesm.mx

Details

A coxph model depending on clusters is run to establish the risk/hazard ratio.

References

Trevino et al. 2016 https://bioinformatics.mx/index.php/bioinfo-tools/

See Also

new.valorate. valorate.survdiff. survival::coxph (survival package).

Examples

Run this code
## Create a random population of 100 subjects 
## having 20 events
subjects <- numeric(100)
subjects[sample(100,20)] <- 1
vo <- new.valorate(rank=subjects, sampling.size=100000, verbose=TRUE)

groups <- numeric(100)
groups[sample(100,20)] <- 1  # 20 to likely see some difference
pvr <- valorate.survdiff(vo, groups) 
print(pvr)

valorate.risk(vo, groups)

Run the code above in your browser using DataLab