search for: modeldats

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

Did you mean: modeldata
2004 Feb 16
1
understanding loops for "loop-plotting"
...function(const,modeldat,YS) { const=const repeat { t1 <- apply(YS,1, function(x) { ifelse(all(is.na(x)) | all(na.omit(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',...