Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

lungcancer

Lung Cancer Clinical Trial


Description

Survival times for patients suffering lung cancer for a treatment and control group.

Usage

data(lungcancer)

Format

A data frame with 14 observations on the following 3 variables.

time

survival time in days.

cens

censoring indicator: 0 censored, 1 event.

group

a factor with levels control and newdrug.

Details

The data is given in Table 9.19, page 293, of Metha and Pathel (2001). The two-sided p-value for the log-rank test is 0.001 (page 295).

References

Cyrus R. Mehta & Nitin R. Patel (2001), StatXact-5 for Windows. Manual, Cytel Software Cooperation, Cambridge, USA

Examples

data(lungcancer)
attach(lungcancer)

# round logrank scores
scores <- cscores.Surv(cbind(time, cens))
T <- sum(scores[group=="newdrug"])
mobs <- sum(group=="newdrug")
system.time(prob <- pperm(T, scores, m=mobs, al="le"))
prob
pperm(T, scores, m=mobs, al="tw")
pperm(T, scores, m=mobs, al="tw", simulate=TRUE)

# map into integers, faster
scores <- cscores.Surv(cbind(time, cens), int=TRUE)
T <- sum(scores[group=="newdrug"])
mobs <- sum(group=="newdrug")
system.time(prob <- pperm(T, scores, m=mobs, al="le"))
prob
pperm(T, scores, m=mobs, al="tw")
pperm(T, scores, m=mobs, al="tw", simulate=TRUE)

detach(lungcancer)

exactRankTests

Exact Distributions for Rank and Permutation Tests

v0.8-32
GPL (>= 2)
Authors
Torsten Hothorn [aut, cre], Kurt Hornik [aut]
Initial release
2021-04-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.