[R] permutation test for Cox proportional hazards regression model
linda porz
porzalinda at gmail.com
Thu Dec 14 15:35:36 CET 2017
I would like to perform a permutation test for Cox proportional hazards
regression model. I only find it for t-test and other tests (e.g. comparing
two medians).
Is there a way that I can perform a Cox PH model in R or SAS for the
LR-test?
I am doing the following
B <- 1000; LRtestx <- rep(NA,B);
Srv <- Surv(Time, Event);
for(j in 1:B){ LRtestx[j] <- cph(Srv~sample(x,length(x),replace=F))$stat[3]};
LRtest <- cph(Srv~x)$stat[3];
sum(LRtestx > LRtest)/B
Many thanks
Linda
[[alternative HTML version deleted]]
More information about the R-help
mailing list