valorate.survdiff {valorate} | R Documentation |
ESTIMATES THE P-VALUE AND STATISTICS OF THE LOG-RANK TEST
Description
Estimates the p-value using the VALORATE calculation.
Usage
valorate.survdiff(vro, clusters, p.func)
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. |
p.func |
the function that provides the estimation. The default is valorate.p.value.sampling. See valorate.p.value. |
Details
The main function to estimate the p-value of the difference of two survival curves under the VALORATE algorithm. Because the definition of the survival group as '1' or '0' is arbitrary, the actual calculation is performed over the less frequent group. From clusters and s=sum(clusters), n1 is determined as the min(s, length(clusters)-s). Then a call for prepare.n1 is performed and finally the p-value estimations. The statistics are added as attributes.
Value
the estimated p-value.
Author(s)
Victor Trevino vtrevino@itesm.mx
References
Trevino et al. 2016 http://bioinformatica.mty.itesm.mx/valorateR
See Also
new.valorate
.
valorate.p.value
.
valorate.plot.empirical
.
Examples
## 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,4)] <- 1 # only 4 subjects are within the 'mutated' group
pvr <- valorate.survdiff(vo, groups)
print(pvr)