Created
November 9, 2022 16:17
-
-
Save MJacobs1985/39c541a3a5fb8b8e249635ebccf80a88 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
total$timef <-as.factor(total$time) | |
total$BMI<-total$Weight_at_consultation/((total$Length_at_consultation/100)^2) | |
## Order data and remove duplicates | |
head(total%>%group_by(Patientnr,time)%>%arrange(Patientnr,time));dim(total) | |
total<-total[!duplicated(total),];dim(total) | |
## The time and Survtime need to be on the same scale for joint modelling - transform to weeks | |
total$SurvTimeWeek<-total$SurvTime/7 | |
pancreas$SurvTimeWeek<-pancreas$SurvTime/7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment