OHDSI / Aphrodite

[in development]
Apache License 2.0
37 stars 15 forks source link

How does Time Normalization work? #11

Closed SSMK-wq closed 4 years ago

SSMK-wq commented 4 years ago

Hello,

I am reading the APHRODITE manual and trying out the Settings.R file where I came across the parameter called timeNormalize. I also tried searching in the paper but couldn't find. can you help please?

May I kindly check with you on examples on for each of the below cases and help me with it?

Let's say that the total number of visits (unique visit_ids) in my data is 20000

1 = normalize by length of patient follow-up in terms of years (if only a single visit, divide by 1 yr)

Ex: Patient "Mark" has 10 visits to hospital in the year 2001 and another 5 visits in year 2002. If I would like to normalize it in terms of years, how does this work? So it can't be 15 visits/2 year as this doesn't give us value between 0-1? Am I right to understand that we are trying to get a value between 0-1 here?

2 = normalize by length of patient follow-up in terms of months (if only a single visit, divide by 1 month)

Ex: Patient "Jack" has 3 visits to hospital in the month of Apr, 2002 and 4 visits in the month of May 2002. If I would like to normalize it in terms of months, how does this work?

3 = normalize by number of visits

Let's say for Jack who has 7 visits in total (in the data), does this work like total visits for the Jack/Total number of visits in the data i.e 7/20000? I might totally be wrong here.

4 = normalize by number of measurement codes, in that category

Let's say that "John" visited as an Inpatient to the hospital 3 times between 2002-2004. During his first visit, he had 10 unique measurement codes, 2nd visit he had 4 unique measurement codes and 3rd visit, he had 13 unique measurement codes.

SSMK-wq commented 4 years ago

This issue can be closed and doesn't require any response. I figured out I guess by looking at the code