Closed wwliao closed 1 year ago
Thanks for the catch! I must have mistyped the formula at first and propagated it throughout the module. Just fixed it - and now the LDlink and hand-calculated D' values match almost perfectly, which is a good sanity check.
Thank you for sharing this wonderful resource!
I have a small query about the formula for the D' in the "4.9 Measuring LD with D'" section. It's currently shown as:
$$ D' = \frac{D}{\mathrm{max}(-p_1 (1-p_1), -q_1 (1-q_1))}, \mathrm{for\ } D < 0 $$
$$ D' = \frac{D}{\mathrm{min}(p_1 (1-p_1), q_1 (1-q_1))}, \mathrm{for\ } D > 0 $$
However, I think it might be:
$$ D' = \frac{D}{\mathrm{max}(-p_1 q_1, -(1-p_1) (1-q_1))}, \mathrm{for\ } D < 0 $$
$$ D' = \frac{D}{\mathrm{min}(p_1 (1-q_1), (1-p_1) q_1)}, \mathrm{for\ } D > 0 $$
Could you kindly verify this?
Thank you for your time and dedication.