Announcement

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

  • Data management for REDCap exports with repeating instruments

    Hello,

    I use Redcap as a database and am trying to use Stata to filter and analyse data from this database. In Redcap you can store data in multiple instruments so that when you export it, you will have data spread across different rows for the same individual. I need to have this data filled out across all rows for some variables.

    For example, in the screenshot: my unique identifier for each individual is cohort_id. For cohort_id 1, age sex and site information isn't present until row 3 (but I have other required data on other rows). For cohort_id 2, this data isn't represented until the 6th row.

    For another dataset, I was able to use this code: bysort cohort_id (site): replace site = site[1]

    I repeated this for each variable I required data on all rows. But for this dataset, my data may be on row 2, 6 or anything else for the individual so I cannot use this code.

    Does anyone know how I can get my data on each row per cohort_id? I don't even care if I have to slowly go through and do it one by one for each variable. Surely someone out there has struggled with this Redcap issue before!

    Thank you.
    Attached Files

  • #2
    Please study the FAQ Advice as requested, especially

    https://www.statalist.org/forums/help#realnames

    https://www.statalist.org/forums/help#stata

    Screenshots are not nearly as helpful as you hope. See the link just above for what to do instead.

    Comment


    • #3
      Hi Nick,

      Thank you for responding and apologies for my faux pas - I have requested my real name be added.

      I have tried to be as clear as I can - I could add that I am using the current version of Stata.

      I don't know which code to use for this particular problem and have not been able to find it anywhere on the internet which is why I have tried the forum.

      Comment


      • #4
        Hello James did you end up figuring a way around this without having to manually go through each id? I seem to be facing the same issue. Thanks!

        Comment

        Working...
        X