like_glpknown_2: Likelihood under three parameter model when using offspring...

View source: R/lrt_glpknown.R

like_glpknown_2R Documentation

Likelihood under three parameter model when using offspring genotypes likelihoods but parent genotypes are known.

Description

This is under the two parameter model.

Usage

like_glpknown_2(gl, alpha, xi1, xi2, g1, g2, log_p = TRUE)

Arguments

gl

The matrix of genotype likelihoods of the offspring. Rows index The individuals, columns index the genotypes.

alpha

The double reduction rate.

xi1

The preferential pairing parameter of parent 1.

xi2

The preferential pairing parameter of parent 2.

g1

Parent 1's genotype.

g2

Parent 2's genotype.

log_p

A logical. Should we return the log likelihood or not?

Value

The (log) likelihood of the two parameter model when using genotype likelihoods.

Author(s)

David Gerard

Examples

g1 <- 1
g2 <- 0
gl <- simf1gl(
  n = 25,
  g1 = g1,
  g2 = g2,
  rd = 10,
  alpha = 0,
  xi1 = 1/3,
  xi2 = 1/3)
like_glpknown_2(
  gl = gl,
  alpha = 0.01,
  xi1 = 0.5,
  xi2 = 0.3,
  g1 = g1,
  g2 = g2,
  log_p = TRUE)


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