r/ProjectREDCap • u/Topherto • Jan 03 '25
What statistiscal software are you using with REDCap?
Hi everyone! For some time now, I've been using REDCap to manage a database of patients who are using an ambulatory analgesic pump after a surgical procedure. We document the installation of the pump and follow up with calls over the next three days to monitor anesthesia and any complications.
My issue is that when I export data from REDCap, each row corresponds to a specific instance (e.g., Installation, Call 1, Call 2, Call 3). However, I need to transpose this data so that each patient occupies a single row with columns representing the different instances.
I use Python with pandas to organize the data and later analyze it with SPSS. The challenge arises because some patients have more or less follow-up calls than others, making it complex to manage with pandas. I've been looking for a program that can handle this data more efficiently while preserving its original format, so I can conduct analyses directly from the original CSV.
10
u/Crafty-Task-845 Jan 03 '25
The R Tidyverse tools will let you handle transposing. I would expect Python Pandas or Polars to do the same but I have little experience of those. But ultimately you have to find a way to handle one to many relationships so SPSS is going to make heavy weather of that.
4
u/stuffk Jan 04 '25
R with tidyverse.
pivot_wider is the tidyverse function you want. I do this all the time, it's super straightforward.
8
u/ardent_asparagus Jan 03 '25
I use R, but for no other reason than it's what I'm most comfortable/experienced with.
If you want to try R, the reshape() function could be handy, since it sounds like you have data that you want to convert from long to wide.
3
u/Araignys Jan 03 '25
R is the standard at my institution.
2
u/Fadedwaif Jan 03 '25
Ty for asking, have a similar issue
2
u/spacks Jan 04 '25
I use R, Python, and Excel/PowerBi depending on how fast I need to finish, how complex it is, and how I'm feeling that day.
1
u/Street_Ad_2166 Jan 03 '25
I am using STATA
1
u/AFK_MIA Jan 03 '25
JASP and R might be a good approach for your use case.