Calculates 2-sided LD tests based on different measures of LD (Kulinskaya and Lewin 2008), 1-sided Fisher's exact test for LD and the conditional p-values proposed in Kulinskaya (2008) to overcome the problems of asymetric distributions.

1 | ```
LD2sided.pvals(ctable)
``` |

`ctable` |
Vector of the 4 entries in the 2x2 contingency table |

`pval.cond` |
Conditional p-value |

`pval.Fish` |
Fisher's p-value (sum of tables less probable than observed) |

`pval.LR` |
P-value based on the likelihood ratio statistic |

`pval.r` |
P-value based on the correlation coefficient |

`pval.Dprime` |
P-value based on D prime |

`pval.delta` |
P-value based on delta (Devlin and Risch) |

`pval.Q` |
P-value based on Yule's Q |

`Prob` |
Probability under the null hypothesis of the observed table |

`LR` |
Likelihood ratio statistic |

`r` |
Correlation coefficient |

`Dprime` |
D prime |

`delta` |
delta (Devlin and Risch) |

`Q` |
Yule's Q |

`yobs` |
The observed n11 (first cell in the table) |

`n1` |
Row margin |

`n2` |
Column margin |

`nn` |
Sample size |

Alex Lewin

Kulinskaya and Lewin 2008

1 2 | ```
ctable <- c(0,9,5,16)
LD2sided.pvals(ctable)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.