Hello Marissa,
When exporting data from REDCap, you should be able to choose which variables (including their unique ID numbers) get exported. Under the left-hand column in REDCap, click the “Data Export Tool.” Choose “Advanced Data Export” (the right-hand box, with the button “Display Advanced Options”), and then you can choose which variables you want exported to Stata. Be sure to include the variable with the unique id number.
After you’ve exported all 4 separate projects, all containing the same unique id number for each participant, you will need to recode the variables within each separate dataset so that each variable is unique when you later combine all 4 datasets. For example, if you have a variable for blood pressure at each time point, you will need to code it BP1 within the baseline dataset, BP2 within the midpoint dataset, BP3 within the final dataset, and BP4 within the overall dataset. Thus, when you combine the datasets later, you’ll have a BP1, BP2, BP3, and BP4 for each participant.
After recoding all the variables so it’s clear which timepoint the variable was collected, you’ll need to sort each of the 4 datasets based on their unique ID and save the dataset. Then, you can use the “merge” command. You will open up one dataset (let’s just say the baseline dataset) , then use the command to merge the midpoint dataset using the unique ID. The command will look something like this:
merge midpoint using id
You can find more information on combining datasets on the website:
http://www.ats.ucla.edu/stat/stata/modules/combine.htm
I’m not sure my explanation is the most elegant way to merge your datasets, but I believe it should work. Hope that the helps, and please let us know if you have more questions.
Thanks!
ellie