- Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
I have a problem merging two data with repetitive measurements.
The merging did not include the second measurment.
library(survival)
data1<- data.frame(
subject = c(1, 2, 3),
time1 = c(3, 2, 2),
time2= c(4, 8, 6),
status = c(1, 0, 1),
First_measu=c(54, 66, 18))
data2<- data.frame(
subject = c(1, 2, 3),
Second_measu=c(66, 73, 82))
###Merge the data to do the coxph
merged_data<-tmerge(data1, data2, id=subject, tstart=time1, tstop=time2)
print(merged_data)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels