Description Usage Arguments Value References See Also Examples
Estimate average hazard ratios from k independent samples based on the Kaplan-Meier estimator
1 2 3 |
L |
time-limit specifying time-interval [0,L] over which average hazard ratios will be calculated |
formula |
an object of class '"formula"' specifying the conditional survival model |
data |
data frame containing the variables in formula |
null.theta |
vector specifying the null hypothesis for the average hazard ratios (H_0: theta = null.theta) |
contrast |
vector of contrasts to test H_0: contrast * (theta - null.theta) = 0 |
multi.test |
calculate multivariate test statistic if TRUE |
cov |
if TRUE calculate covariance matrix estimator (direct) |
bootstrap |
if > 0 then use bootstrap to estimate covariance matrix (ignore if cov is TRUE) |
left.limit |
if TRUE use left-continuous interpolation of WKM estimates |
An object of class '"ahr"'
J.~D. Kalbfleisch and R.~L. Prentice. Estimation of the average hazard ratio. Biometrika, 68(1):105–112, Apr. 1981.
1 2 3 4 5 6 7 8 9 10 11 12 | T <- c(rexp(100, 1), rexp(100, 2))
C <- c(rexp(100, 1), rexp(100, 2))
Y <- pmin(T, C)
D <- T <= C
Z <- rep(c(0,1), c(100, 100)) # treatment indicator
fit <- ahrKM(2, Surv(Y, D) ~ Z, data.frame(Y=Y, D=D, Z=Z))
fit
## the same as above, but estimate covariance matrix using bootstrap
## Not run: fitBS <- ahrKM(2, Surv(Y, D) ~ Z, data.frame(Y=Y, D=D, Z=Z), cov=FALSE,
bootstrap=1000)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.