Compute p-values and likelihoods of all possible models for a given number of functional SNP(s).

1 |

`n.fp` |
number of functional SNPs for tests. |

`n` |
array of each total number of case sample chromosomes for SNPs |

`x` |
array of each total allele number in case samples |

`geno` |
matrix of alleles, such that each locus has a pair of adjacent columns of alleles, and the order of columns corresponds to the order of loci on a chromosome. If there are K loci, then ncol(geno) = 2*K. Rows represent the alleles for each subject. Each allele shoud be represented as numbers (A=1,C=2,G=3,T=4). |

`no.con` |
number of control chromosomes. |

matrix of likelihood ratio test results. First n.fp rows indicate the model for each set of disease polymorphisms, and followed by p-values, -2 log(likelihood ratio) with corrections for variances, maximum likelihood ratio estimates, and likelihood.

allele.freq hap.freq

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ```
## LRT tests when SNP1 & SNP6 are the functional polymorphisms.
data(apoe)
n<-c(2000, 2000, 2000, 2000, 2000, 2000, 2000) #case sample size = 1000
x<-c(1707, 281,1341, 435, 772, 416, 1797) #allele numbers in case samples
Z<-2 #number of functional SNPs for tests
n.poly<-ncol(apoe7)/2 #total number of SNPs
#control sample generation( sample size = 1000 )
con.samp<-sample(nrow(apoe7),1000,replace=TRUE)
con.data<-array()
for (i in con.samp){
con.data<-rbind(con.data,apoe7[i,])
}
con.data<-con.data[2:1001,]
lrt(1,n,x,con.data)
lrt(2,n,x,con.data)
``` |

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.