Computes a weighted version of the logrank and stratified logrank tests
for comparing two or more survival distributions. The generalization to
complex samples is based on the characterization of the logrank test as
the score test in a Cox model, Under simple random sampling with
replacement, this function with rho=0
and gamma=0
is almost identical to the robust score test
in the survival package.
1  svylogrank(formula, design, rho=0,gamma=0,method=c("small","large","score"), ...)

formula 
Model formula with a single predictor and optionally a 
design 
A survey design object 
rho,gamma 
Coefficients for the Harrington/Fleming Grhogamma
tests. The default is the logrank test, 
method 

... 
for future expansion. 
A vector containing the zstatistic for comparing each level of the variable to the lowest, the chisquared statistic for the logrank test, and the pvalue.
Rader, Kevin Andrew. 2014. Methods for Analyzing Survival and Binary Data in Complex Surveys. Doctoral dissertation, Harvard University.http://nrs.harvard.edu/urn3:HUL.InstRepos:12274283
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19  library("survival")
data(nwtco)
## stratified on case status
dcchs<twophase(id=list(~seqno,~seqno), strata=list(NULL,~rel),
subset=~I(in.subcohort  rel), data=nwtco, method="simple")
svylogrank(Surv(edrel,rel)~factor(stage),design=dcchs)
data(pbc, package="survival")
pbc$randomized < with(pbc, !is.na(trt) & trt>0)
biasmodel<glm(randomized~age*edema,data=pbc)
pbc$randprob<fitted(biasmodel)
dpbc<svydesign(id=~1, prob=~randprob, strata=~edema, data=subset(pbc,randomized))
svylogrank(Surv(time,status==2)~trt,design=dpbc)
svylogrank(Surv(time,status==2)~trt,design=dpbc,rho=1)
rpbc<as.svrepdesign(dpbc)
svylogrank(Surv(time,status==2)~trt,design=rpbc)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.