like_gknown_3: Likelihood under three parameter model when genotypes are...

View source: R/lrt_gknown.R

like_gknown_3R Documentation

Likelihood under three parameter model when genotypes are known

Description

This is under the three parameter model.

Usage

like_gknown_3(x, tau, beta, gamma1, gamma2, g1, g2, log_p = TRUE, pen = 0)

Arguments

x

A vector of length 5. x[i] is the count of individuals with genotype i-1.

tau

The probability of quadrivalent formation.

beta

The probability of double reduction given quadrivalent formation.

gamma1

The probability of AA_aa pairing for parent 1.

gamma2

The probability of AA_aa pairing for parent 2.

g1

Parent 1's genotype.

g2

Parent 2's genotype.

log_p

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

pen

A tiny penalty to help with numerical stability

Value

The (log) likelihood.

Author(s)

David Gerard

Examples

x <- c(1, 4, 5, 3, 1)
tau <- 0.5
beta <- 0.1
gamma1 <- 0.5
gamma2 <- 0.3
g1 <- 1
g2 <- 2
like_gknown_3(
  x = x,
  tau = tau,
  beta = beta,
  gamma1 = gamma1,
  gamma2 = gamma2,
  g1 = g1,
  g2 = g2)


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