Created
October 5, 2018 15:35
-
-
Save tonebeta/32c5ca74b465c9cba119f4c7b5ca7fed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dt<- read_csv("C:/Users/tonebeta/Desktop/O68_Gastrointestinal_bleeding.csv") | |
dt$PATIENTID <- NULL | |
vars = names(dt) | |
vars = setdiff(vars, c("GROUPNAME","DURATION","STATUS")) | |
dt[vars] <- lapply(dt[vars],factor) | |
Cox_model = coxph(Surv(dt$DURATION,dt$STATUS) ~ . ,data=dt) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment