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
Can I simulate a children income distribution based on the marginal distribution of their fathers' income and a given copula?Dear all, I would very much appreciate your thoughts on the following question: I have the data on …
tline on top of the graph using command twoway areaHi, I want to plot a reference line on top of the graph using command tline, but it's just under the…
Convert time with a 12 hrs setting, to 24 hrsDear all, I have to convert a variable setting in "12 hours" to "24 hours". I divided the variable …
A Question about Analyzing Shool-nested Panel DataHi, I have a question about analyzing school-nested panel data. I am using education panel data to e…
how to get the coefficient of post and treat when estimating a DID model with REGHDFE and absorb option that absorbs indivisual and time fixed effectHi dear, my estimation model looks like following: Yijkt = β0 + β1 ∗ treat_j + β2 ∗ post_t + β3 ∗ t…
Subscribe to:
Post Comments (Atom)
0 Response to Repeated Measures Duplicates
Post a Comment