CancerRegistryOfNorway / nordcansurvival

Other
0 stars 0 forks source link

end_of_follow_up #49

Closed CotterpinDoozer closed 3 months ago

CotterpinDoozer commented 2 years ago

Denmark had issues running the survival analysis in 9.2, but it was solved when Simon changed end_of_follow_up for patients still alive from 31.12.2020 to 31.12.2021.

Why did this change work? Is there any restrictions to end_of_follow_up somewhere in nordcan.R or in the survival analysis? For instance that end_of_follow_up needs to be at least a year after the last year of diagnosis?

BjarteAAGNES commented 2 years ago

In extract_define_survival_data.ado

https://github.com/CancerRegistryOfNorway/nordcansurvival/blob/f67d18efa9c4c9856d3fc1949b18b2ba249a0547/inst/stata/ado/extract_define_survival_data.ado#L265

Thus, the assert will fail if either

  1. date_of_birth == 31.dec.2020 AND end_of_followup == 31.dec.2020
  2. year of follow up is restricted to 2020 and incidence data is covering 2021 with one, or more, born in 2021

possible solutions:

  1. update instructions/documentation
  2. modify Stata to catch this "error" and return messages to user via an error/log file.
CotterpinDoozer commented 2 years ago

I sent this assert to Simon to have him check in his original data. His reply is:

"Regarding the change to the follow-up, I just checked and we do not have any combinations that should cause the assert to fail."

So we probably then need to check a bit more.

CotterpinDoozer commented 1 year ago

Issue: Denmark had issues running the survival analysis in 9.2, but it was solved when Simon changed end_of_follow_up for patients still alive from 31.12.2020 to 31.12.2021. Why did this change work? Is there any restrictions to end_of_follow_up somewhere in nordcan.R or in the survival analysis? For instance that end_of_follow_up needs to be at least a year after the last year of diagnosis?

Huidong comment: leave it as it is now, until Simon presents a new request/bug

CotterpinDoozer commented 1 year ago

We will leave this case pending until nordcan.R is run next time.

CotterpinDoozer commented 1 year ago

Anna will test manipulating end of follow up with different dates in global settings.