logrank {ANSM5} | R Documentation |
Perform logrank test
Description
logrank()
performs the logrank test and is used in chapter 9 of "Applied Nonparametric Statistical Methods" (5th edition)
Usage
logrank(
x,
censored,
groups,
score.censored = TRUE,
max.exact.perms = 1e+05,
nsims.mc = 10000,
seed = NULL
)
Arguments
x |
Numeric vector of same length as censored, groups |
censored |
Binary vector of same length as x, groups |
groups |
Factor of same length as x, censored |
score.censored |
Boolean indicating whether or not to score censored values (defaults to |
max.exact.perms |
Maximum number of permutations allowed for exact calculations (defaults to |
nsims.mc |
Number of Monte Carlo simulations to be performed (defaults to |
seed |
Random number seed to be used for Monte Carlo simulations (defaults to |
Value
An ANSMtest object with the results from applying the function
Examples
# Example 9.6 from "Applied Nonparametric Statistical Methods" (5th edition)
logrank(ch9$samplesAB.survtime, ch9$samplesAB.censor, ch9$samplesAB, score.censored = FALSE)
# Exercise 9.7 from "Applied Nonparametric Statistical Methods" (5th edition)
logrank(ch9$samplesXYZ.survtime, ch9$samplesXYZ.censor, ch9$samplesXYZ)
[Package ANSM5 version 1.1.0 Index]