ddsjoberg / dcurves

Decision Curve Analysis
http://www.danieldsjoberg.com/dcurves/
Other
37 stars 14 forks source link

Observation weights? #8

Closed hlhowardliu closed 2 years ago

hlhowardliu commented 2 years ago

Hi,

Would it be possible to add support for observation weights? I'm currently duplicating my data as a crude workaround, but having an observation weight option would be really helpful.

Thanks!

ddsjoberg commented 2 years ago

Hi @hlhowardliu, Apologies for the delayed response. My sense is that accepting weighted data objects (like those from the survey or srvyr packages) is out of the scope of what I'd like to support.

I would need to think much deeper about the consequences of complex weighting designs and DCA....to my knowledge, there are no manuscripts detailing DCA+complex weighting schemes....

ck37 commented 7 months ago

I could also use support for observation weights. Looking at Vickers et al. 2016 Equation 1 (page 3), it seems like we would replace true positives with the sum of weights of those observations, then instead of N divide by the sum of weights for all observations. And the same thing for false negatives. With weights = 1, it would be the same as the current formula.