statdivlab / radEmu

Other
50 stars 8 forks source link

Not finding MLEs #2

Closed adw96 closed 9 months ago

adw96 commented 2 years ago

It seems that, at present, the algorithm isn't finding MLEs in at least some cases. We have some examples of the unweighted, unpenalized radEmu problem where we can find higher likelihood estimates of beta and z that satisfy our desired identifiability constraint.

Flagging for a possible bug in optimization algorithm.

@ailurophilia Is this a known issue? 🙏

adw96 commented 1 year ago

Turns out this issue is fully resolved by removing KOs with "perfect separation" issues. The below PDF documents the apparent issue and its resolution.

@svteichman Do you think you could submit a PR that implements warnings when this behavior is observed? I think this could cover two situations:

  1. Checking the dataset when there is a single binary covariate (similar to as described in the attached)
  2. Issuing a warning when the max iteration/convergence threshold is reached AND the final estimates do not have the highest value of the objective function out of all iterations. Something to the tune of "Results may not be reliable; please to investigate carefully." This warning should be checked for both Firth and ML algorithms.

Thanks @svteichman and @ailurophilia ! @svteichman would you mind closing this issue when you have the PR merged?

example_rademu_alg1.pdf

svteichman commented 1 year ago

Yes can do!