Dear friends,
asking kindly for your help!!!! apologize is the question too simple for many of you....I got lost:-)
attached is the example of my dataset (sorry for attachment, did not managed to post it in this text to get it clearly): here is one patient (id number 11) in long format -each line indicates one medication, he/she gets medication coded with ATC (m_kode), dosage, dosage_antal (amout) , dosage_enhed (mg or grams etc), WAVE indicates the point when I looked at medication: 1- baseline, 2- middleway, 3-outcome 90 days.
I need to se if I made a dosis change:
I generated new variables : medicine_dosage1(baseline),medicine_dosage2(middle way), medicine_dosage3 (outcome)
I can see I can not just say : generate dosis_change=medicine_dasage3-medicine_dosage1
Please, give me a little hint if I am moving wrong and how I can handle it?
Should I reshape to wide to be able to do it?
1000 thanks in advance!
Kindly, Natallia
asking kindly for your help!!!! apologize is the question too simple for many of you....I got lost:-)
attached is the example of my dataset (sorry for attachment, did not managed to post it in this text to get it clearly): here is one patient (id number 11) in long format -each line indicates one medication, he/she gets medication coded with ATC (m_kode), dosage, dosage_antal (amout) , dosage_enhed (mg or grams etc), WAVE indicates the point when I looked at medication: 1- baseline, 2- middleway, 3-outcome 90 days.
I need to se if I made a dosis change:
I generated new variables : medicine_dosage1(baseline),medicine_dosage2(middle way), medicine_dosage3 (outcome)
I can see I can not just say : generate dosis_change=medicine_dasage3-medicine_dosage1
Please, give me a little hint if I am moving wrong and how I can handle it?
Should I reshape to wide to be able to do it?
1000 thanks in advance!
Kindly, Natallia

Comment