I have a longitudinal dataset with a studyid visit_date refill_date adherence and stage
I have multiple observations per subject. I however have duplicates among the visit_dates and the refill_dates that I would like to delete and stay with just the uniques dates per subject. If I use drop duplicates, I lose dates that may be duplicates for one subject but not for another subject who had a refill that day. How do I delete the duplicates without losing data. The data was not originally collected as longitudinal and the problem arose in its extraction by duplicating dates This is how the data looks like
ID Visit_date Refill_Date Vart
1 29/05/18 29/05/18 yes
1 29/06/18 29/06/18 no
1 29/06/18 29/06/18 no
1 30/07/18 30/07/18 no
2 29/05/18 29/05/18 yes
2 30/07/18 30/07/18 yes
2 30/07/18 30/07/18 no
3 01/05/18 01/05/18 yes
and so on. Some dates are repeated 3 times and others more than 3 times. I have 10 other variables and about 120,000 observations in the long form. I have 500 subjects.
Thank you
0 Response to Repeated Measures Duplicates
Post a Comment