search for: survivalx

Displaying 1 result from an estimated 1 matches for "survivalx".

Did you mean: survival
2004 Feb 16
1
understanding loops for "loop-plotting"
...it(x) < 0 ,NA, which( x > const ))}) t1[is.na(t1)] <- 13 t2 <- sapply(t1,function(x) { ifelse(x ==13,0,1)}) modeldat$MONTH <- t1 modeldat$ACTIVE <- t2 modeldats <- na.omit(modeldat) mod1 <- coxph(Surv(MONTH,ACTIVE) ~ ALTER+RISIKO,data=modeldats) pdf(file = "c:/Survivalx.pdf", width = 6, height = 6, onefile = TRUE, family = "Helvetica",title = "R Graphics Output") plot(survfit(mod1),ylim=c(.7,1),xlab='Month',ylab='Proportion not Active') const=const+1 if(const > 5) break } dev.off() }