ictr / mendel_penetrance

0 stars 1 forks source link

How does mendel handles unknown age of diagnosis #8

Open BoPeng opened 1 month ago

BoPeng commented 1 month ago

Code is 999.

BoPeng commented 1 month ago
    if (agebc.eq. 999) then
        if(agelfu.gt.0 .and. agedeath.gt.0) then
            agebc=min(agelfu,agedeath)
        elseif(agelfu.gt.0 .and. agedeath.eq.0) then
            agebc=agelfu
        elseif(agelfu.eq.0 .and. agedeath.gt.0) then
            agebc=agedeath
        else
            agebc=0
        endif
    endif

Basically, 999 age of diagnosis values are imputed by age of death, age of last follow up, or set to 0 if both are missing.

BoPeng commented 1 month ago
  1. agedeath is obtained from age at death
  2. agelfu =Age= 2023 -Year_Birth`
  3. If age of diagnosis is 999, use agedeath, then agelfu, then 0
  4. if age of diagnosis is 0 (with diagnosis, but Colorectal_age_dx is NA or 0 or 888, and there is no agelfu, and no agedeath), then treat as NO CANCER.