Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Merging problems


    Hi Statalist,

    I have exported some data from RedCap.
    For a cohort of 100 people, multiple bloodtests have been taken on 5 different trial days (named 1-5). The trial days all are different dates. Instead of the answers of the blood tests being written according to the right trial date, they have their own row (postpartum_data_co_arm_1). I would like the bloodtest variables to be moved "up" to the correct date/trial day.
    all dates are in date format.

    Is there any way to do this?
    I tried generating a match flag, but it does not indicate match between the dates?

    I hope the picture makes sense :-)
    Attached Files
    Last edited by Astrid Chr; 27 Nov 2023, 03:58.

  • #2
    To increase your chances of obtaining a helpful reply, present a data example using the dataex command as recommended in FAQ Advice #12. You can, e.g., copy and paste the result of

    Code:
    dataex if record_id==108
    Instead of the answers of the blood tests being written according to the right trial date, they have their own row (postpartum_data_co_arm_1)
    This is not clear to me. Do you mean that the dates are recorded in a different variable? It would be helpful if you could also show us, based on the data example, how you would like the amended dataset to look.

    Comment

    Working...
    X