llike_li: Objective function for 'em_li()'

View source: R/RcppExports.R

llike_liR Documentation

Objective function for em_li()

Description

Objective function for em_li()

Usage

llike_li(B, lpivec)

Arguments

B

The log-likelihood matrix. Rows are individuals columns are genotypes.

lpivec

The log prior vector.

Value

The log-likelihood of a vector of genotype frequencies when using genotype likelihoods. This is from Li (2011).

Author(s)

David Gerard

References

  • Li, H. (2011). A statistical framework for SNP calling, mutation discovery, association mapping and population genetical parameter estimation from sequencing data. Bioinformatics, 27(21), 2987-2993. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1093/bioinformatics/btr509")}

Examples

# Simulate some data
set.seed(1)
gl <- simgl(nvec = c(3, 2, 4, 1, 2))
# Log-likelihood at given log-priors
prob <- c(0.1, 0.2, 0.4, 0.2, 0.1)
lprob <- log(prob)
llike_li(B = gl, lpivec = lprob)


segtest documentation built on July 1, 2025, 1:07 a.m.