Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Likelihoodfun

Calculating log-Likelihood Function


Description

Calculate the natural logarithm of the likelihood function.

Usage

Likelihoodfun(p1m, p2f, p1f, n1m, n0m, n2f, n1f, n0f)

Arguments

p1m

The male allele frequency of allele 1.

p2f

The female genotype frequency of genotype (1, 1).

p1f

The female genotype frequency of genotype (1, 2).

n1m

The number of males with allele 1.

n0m

The number of males with allele 2.

n2f

The number of females with genotype (1, 1).

n1f

The number of females with genotype (1, 2).

n0f

The number of females with genotype (2, 2).

Details

The values of p1m, p2f and p1f should be from 0 to 1, otherwise NaN is presented.

Value

The function returns the value of the natural logarithm of the likelihood function.

Author(s)

Xiao-Ping You, Qi-Lei Zou, Jian-Long Li, Ji-Yuan Zhou

References

You XP, Zou QL, Li JL, Zhou JY. 2015 Likelihood Ratio Tests for Hardy-Weinberg Equilibrium at Marker Loci on X Chromosome. (submitted)

Zheng G, Joo J, Zhang C, Geller NL. 2007 Testing Association for Markers on the X Chromosome. Genetic Epidemiology, 31: 834-843.

Dempster AP, Laird NM, Rubin DB. 1977 Maximum Likelihood from Incomplete Data via the EM algorithm. Journal of the Royal Statistical Society Series B(Methodological), 39: 1-38.

See Also


XHWE

X Chromosome Hardy-Weinberg Equilibrium

v1.0
GPL-2
Authors
Xiao-Ping You, Qi-Lei Zou, Jian-Long Li, Ji-Yuan Zhou
Initial release
2015-06-02

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.