glum icon indicating copy to clipboard operation
glum copied to clipboard

Negative weights

Open lbittarello opened this issue 3 years ago • 1 comments

Is there a reason for which we forbid negative weights (ref)? Some IV weighting schemes use negative weights to isolate compliers.

lbittarello avatar Dec 30 '21 17:12 lbittarello

I know of 3 reasons:

  • Pretty much any statical interpretation of weights requires them to be non-negative, e.g. aggregated observations/frequency weights define a weighted CDF and a CDF must map to [0, 1].
  • The optimization problem might become non-convex, even for canonical log-link combinations. Note that with only a few negative weights, the opt problem might still be well defined.
  • If one uses a true IRLS solver, the LS step takes the square root of the weights.

I also know of one real use case for negative weights:

  • In particle physics, one sometimes simulates particles (reactions/interactions) and then assigns negative weights to some simulations (rows) such that the overall probabilities are well calibrated.

I could imagine an option check_for_negative-weights with default True.

lorentzenchr avatar Nov 13 '23 12:11 lorentzenchr