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
Related Posts with Repeated Measures Duplicates
"cannot open C:\Program Files (x86)\Stata13\inter.txt" , what i can do to open the matrix file?i create a distance matrix using spmat command, and when i export the following matrix to a text for…
rolling geometric meanHi, Is there a simple way to calculate rolling geometric means, for example 10 year window? Can I u…
Interpretation of results of catigorical#continuous interaction in comparison to reparameterized regression modelHello nice to meet you After having searched this forum and google for several days without "clear…
sum of specific consecutive obsHello Everyone, I use Stata 15. The table below shows customer ID, year, and the value of transact…
DecimalsHi all, I have one question about decimals. For example, variable age and casi_total in the data se…
Subscribe to:
Post Comments (Atom)
0 Response to Repeated Measures Duplicates
Post a Comment