0

I have two REDCap projects that I have to stack on top of each other. It has many variables that I am reformatting. My question is if the same variable on two different projects was coded differently, do I just need to just reformat the variable on one of the projects so it looks the same eventually? What is the best way to address this?

For example, look at the number_household_adults variables below.

enter image description here

wibeasley
  • 5,000
  • 3
  • 34
  • 62
  • It depends on what your goal is. Do you want to combine both data sets and analyze them as one variable? If so, you may consider using scale() on each variable before combining (this will normalize them into z-scores so they can be combined). But this requires several assumptions to be met, and so this is more of a statistical question than an R-scripting question. – KamRa Oct 01 '20 at 00:26
  • 1
    that just looks like a count/integer, why would it need formatting in the first place? If you had two factors with different `levels`, then it would require some reformatting – rawr Oct 01 '20 at 00:28
  • 1
    If you look at the options; one is 1:9 and the other is 0:10. I think what I am trying to ask is, once i stack them, the fact that 0 and 10 are not on the left side would not matter? – Maleeha Shahid Oct 01 '20 at 00:38
  • 1
    is 4 adults on the left not the same as 4 adults on the right? – rawr Oct 01 '20 at 00:42
  • They are the same but there is no option for 0 adults and 10 adults on the left? – Maleeha Shahid Oct 01 '20 at 00:45
  • it's just a count... and I don't think you would get a household with 0 adults – rawr Oct 01 '20 at 00:49
  • So, I think I understand what you are saying. So lets say, the variable in categorical like race and one side has; 1= White, 2= African- American, 3= Asian and the other study has 1= White, 2= African- American, 3= Asian, 4 = Other. I can just recode race on both sides 1= White, 2= African- American, 3= Asian, 4 = Other and I am good to go? – Maleeha Shahid Oct 01 '20 at 00:58
  • I probably would not do that, but that is entirely your decision. in that case I would combine all 3-4 and call it asian/other or just other – rawr Oct 02 '20 at 03:54

0 Answers0