Last data update: 2014.03.03

R: P-values and Linkage Disequilibrium measures for several...
LD2sided.pvalsR Documentation

P-values and Linkage Disequilibrium measures for several tests of Linkage Disequilibrium

Description

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.

Usage

LD2sided.pvals(ctable)

Arguments

ctable

Vector of the 4 entries in the 2x2 contingency table

Value

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

Author(s)

Alex Lewin

References

Kulinskaya and Lewin 2008

See Also

LD2sided.tables

Examples

ctable <- c(0,9,5,16)
LD2sided.pvals(ctable)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(LDtests)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/LDtests/LD2sided.pvals.Rd_%03d_medium.png", width=480, height=480)
> ### Name: LD2sided.pvals
> ### Title: P-values and Linkage Disequilibrium measures for several tests
> ###   of Linkage Disequilibrium
> ### Aliases: LD2sided.pvals
> ### Keywords: htest
> 
> ### ** Examples
> 
> ctable <- c(0,9,5,16)
> LD2sided.pvals(ctable)
$pval.cond
[1] 0.2741935

$pval.Fish
[1] 0.2860301

$pval.LR
[1] 0.1622458

$pval.r
[1] 0.2860301

$pval.Dprime
[1] 0.1436782

$pval.delta
[1] 0.1622458

$pval.Q
[1] 0.1436782

$Prob
[1] 0.142794

$LR
[1] 3.980948

$r
[1] -0.29277

$Dprime
[1] -1

$delta
[1] -0.5625

$Q
[1] -1

$yobs
[1] 0

$n1
[1] 9

$n2
[1] 5

$nn
[1] 30

> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>