Displaying 1 result from an estimated 1 matches for "num_t".
Did you mean:
num_th
2012 Oct 19
2
Question about survdiff in for-loop.
Hi everyone!!
I have dataset composed of a numbers of survival analyses.
( for batch survival analyses by using for-loop) .
Here are code !!
#######
dim(svsv)
Num_t<-dim(svsv)
Num<-Num_t[2] # These are predictors !!
names=colnames(svsv)
for (i in 1:Num )
{
name_tt=names[i]
survdiff(Surv(survival.m, survival) ~ names[i], data=svsv)
fit.Group<-survfit(Surv(survival.m, survival) ~ names[i] , data=svsv)
plot(fit.Group, col=2:1, xlab="Survival&qu...