iqss-research / 2k1-in-silico

An Interactive Methods Non-Textbook
https://iqss-research.github.io/2k1-in-silico/
Other
6 stars 3 forks source link

General range issues for Negative Binomial with extreme parameters #31

Closed dskinnion closed 11 months ago

dskinnion commented 11 months ago

The first plot (conditional plot) of y in the DGP tab is blank if the betas are set to their maxima.

dskinnion commented 11 months ago

Seems more like a domain issue, since we have really big data values in this case (which would mean low probabilities at the lower end), and the lower end stops at 30.

dskinnion commented 11 months ago

Even without parameters at their extrema, sometimes the conditional plot does not show... (E.g.: n = 136, Normal B, B0 = 0.26, B1 = 1.15, sigma = 1.28)

dskinnion commented 11 months ago

This one looks to break around when a large X value is added in... Maybe the math can't handle big values.

dskinnion commented 11 months ago

Switched code to work with combinatorics instead of factorial, and made the density discrete instead of continuous & this fixed the issue.