to assess cohort effects within the analyses (e.g regression analysis), we are thinking about introducing a categorical variable cohort which has the following characteristics: 1 = cohort 1, 2 = cohort 2, 3 = cohort 3
Before we do so we wanted to check: is there a DataSHIELD specific way of doing so?
@Marie you can paste a script as a code block into a message and then click the <> button.
This will mean that screen readers can also read the code, and it is searchable. Instructions and a video here on how to do this: https://community.rstudio.com/t/faq-how-to-format-your-code/6246
What exactly does your study_id tell you?
We have one separate table for each study consisting of three cohorts. I am assuming, that you have one big table with different combinations of variables making several separate studies, right?
If I got it right then in this case your study_id would correspond to something like a cohort_id in our case.
What exactly does your study_id tell you?
Study_id= participant’s identification number. As this is a numeric variable you can create zeroes (id-id) and ones ((id - id) + 1) and create the dummy variables for each cohort/study centre:
C1 C2 C3 C4 C5
source 1: 1 0 0 0 0
source 2: 0 1 0 0 0
source 3: 0 0 1 0 0
source 4: 0 0 0 1 0
source 5: 0 0 0 0 1
C1-5= cohort 1-5
If I run models with 5 studies and want to adjust for cohort centre, then I should add the newly created variables labelled as “source.1”, “source.2” etc