Version: | 0.1-6 |
Date: | 2019-04-10 |
Title: | Two Stage Hazard Rate Comparison |
Author: | Jun Sheng, Peihua Qiu <pqiu@ufl.edu>, and Charles J. Geyer <charlie@stat.umn.edu> |
Maintainer: | Charles J. Geyer <charlie@stat.umn.edu> |
Depends: | R (≥ 3.0.2) |
Description: | Two-stage procedure compares hazard rate functions, which may or may not cross each other. |
License: | MIT + file LICENSE |
NeedsCompilation: | yes |
Packaged: | 2019-04-09 05:42:28 UTC; geyer |
Repository: | CRAN |
Date/Publication: | 2019-04-09 06:12:41 UTC |
Litter-matched Time-to-response Data
Description
Rats were taken from 50 distinct litters and one rat from the litter was randomly selected and given the drug. For each litter two rats were selected as controls and were given a placebo. In the treatment group, there are 29 censored observations of the times to tumor.
Usage
data(rats)
Format
A data frame with records for 150 rats.
- time
Time to tumor or censoring.
- delta
Zero or one, zero indicates censoring.
- group
Zero or one, one indicates treatment group.
References
Qiu, P. and Sheng, J. (2008). A two-stage procedure for comparing hazard rate functions. Journal of the Royal Statistical Society: Series B, 70:191-208.
Mantel, N., Bohidar, N. R. and Ciminera, J. L. (1977). Mantel-Haenszel analysis of litter-matched time-to-response data, with modifications for recovery of interlitter information. Cancer Research, 37:3863-3868.
Examples
library(TSHRC)
data(rats)
Two-stage procedure for comparing hazard rate functions
Description
Two-stage procedure for comparing hazard rate functions, especially suited for situation where hazard rate functions cross.
Usage
twostage(time, delta, group, nboot, alpha = 0.05, eps = 0.1)
Arguments
time |
a vector of type |
delta |
a vector of type |
group |
a vector of type |
nboot |
number of bootstrap samples. Must be positive integer. |
alpha |
significance level, must be between zero and one. |
eps |
small number used in defining the test statistic. Must be between zero and one. See cited paper for discussion. |
Details
This procedure compares two hazard rate functions in two stages. In the first stage, the conventional log-rank test is performed, which is powerful only when the two hazard rate functions do not cross each other. When the two hazard rate functions cross each other, positive differences and negative differences between the two functions would be canceled out in the log-rank test statistic, resulting in ineffective comparison. If the log-rank test gives a significant result, then the entire two-stage procedure stops and we conclude that the two hazard rate functions are significantly different. Otherwise, the stage-II test is performed, which is designed specifically for detecting crossing difference between the two hazard rate functions and has the property that its test statistic is independent of the log-rank test statistic. The independence property is used in properly defining the p-value of the two-stage procedure, based on the p-values of the two individual tests.
Value
vector of P-values. "LRPV"
: p-value of the log-rank test,
"MTPV"
: p-value of the suggested stage-II test,
"TSPV"
: p-value of the two-stage test.
References
Qiu, P. and Sheng, J. (2008). A two-stage procedure for comparing hazard rate functions. Journal of the Royal Statistical Society: Series B, 70:191-208.
Examples
library(TSHRC)
data(rats)
attach(rats)
twostage(time, delta, group, nboot = 100)