Open rekkasa opened 2 years ago
Yeah - this was something I realized when writing the code but wasn't sure how to address it. Sometimes people want to predict from the cohort end, but then the timepoint is not possible to set as the time point is relative to cohort start. I wonder whether we can add in extra columns to the cohort where we have the time relative to the cohort end and use these times rather than those relative to the cohort start when people select cohort end? I think this would require adding a bit of SQL when extracting the data and an edit to the population code.
Describe the bug If
timepoint
is missing from the definition of the population settings a defaulttimepoint
based onriskWindowEnd
setting is set (develop branch: CyclopsModels.R, line 256). This assumes that theendAnchor
setting was"cohort start"
. Maybe we should prevent allowing the user to set it to"cohort end"
as it requires knowing a future patient's full time at risk to do predictions.Set up (please run in R "sessionInfo()" and copy the output here): Not needed
To Reproduce Any cox model with
timepoint = 0
andendAnchor = "cohort end"
will do.PLP Log File Not needed
Additional context None