Open bpuladi opened 1 year ago
I have tested the code additionally, but it seems to be valid with plus. Therefore a thinking error. The original code in workflows would have to be the same in content (boot and orig swapped) and made from + -: optimism <- out[ , paste0(perfName, "Boot")] - out[ , paste0(perfName, "Orig")] final_estimate <- out[ , paste0(perfName, "Apparent")] - optimism
Since it can influence the results in studies, I ask to check this again against! Thanks a lot!
I think there is still a problem: https://r-craft.org/r-news/part-2-optimism-corrected-bootstrapping-is-definitely-bias-further-evidence/
I am currently working on the topic "Calculation of Optimism-Corrected Performance". Caret provides this function via trainControl(method="optimism_boot"). I took the liberty to have a look at the code. In doing so, I noticed the following here:
caret/R/workflows.R line 316 final_estimate <- out[ , paste0(perfName, "Apparent")] + optimism
That should be: final_estimate <- out[ , paste0(perfName, "Apparent")] - optimism
Excerpt from the book "Clinical Prediction Models" by Ewout Steyerberg, page 107, chapter 5.3.4 "Calculation of Optimism-Corrected Performance".
ptimism-corrected performance is calculated as Optimism-corrected performance = Apparent performance in original sample - Optimism; where Optimism = Bootstrap performance - Test performance:
Or?