Mercurial > repos > testtool > survival
changeset 20:b4d7a110dd32 draft
Uploaded
author | testtool |
---|---|
date | Mon, 02 Oct 2017 08:51:05 -0400 |
parents | d95c8e3b24e7 |
children | f0f0a46d7b4e |
files | survival/survival.R |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/survival/survival.R Mon Oct 02 08:44:25 2017 -0400 +++ b/survival/survival.R Mon Oct 02 08:51:05 2017 -0400 @@ -4,12 +4,12 @@ input = args[1] type = args[2] error = args[3] -conf.type = args[4] -conf.lower = args[5] +conf_type = args[4] +conf_lower = args[5] fit = args[6] png = args[7] -tofit <- survival::survfit(Surv(obsT, status) ~ X1, type = type, error = error, conf.type = conf.type , conf.lower = conf.lower, data = read.csv(input)) +tofit <- survival::survfit(Surv(obsT, status) ~ X1, type = type, error = error, conf.type = conf_type , conf.lower = conf_lower, data = read.csv(input)) res <- summary(tofit,times=c(1,2,3)) save.df <- as.data.frame(res[c("strata", "time", "n.risk", "n.event", "surv", "std.err", "lower", "upper")])