Learn R Programming

segtest (version 2.0.0)

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

Description

This is under the three parameter model.

Usage

like_glpknown_3(gl, tau, beta, gamma1, gamma2, g1, g2, log_p = TRUE)

Value

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

Arguments

gl

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

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?

Author

David Gerard

Examples

Run this code
g1 <- 1
g2 <- 0
gl <- simf1gl(
  n = 25,
  g1 = g1,
  g2 = g2,
  rd = 10,
  alpha = 0,
  xi1 = 1/3,
  xi2 = 1/3)
like_glpknown_3(
  gl = gl,
  tau = 1/2,
  beta = 1/12,
  gamma1 = 1/3,
  gamma2 = 1/3,
  g1 = g1,
  g2 = g2,
  log_p = TRUE)

Run the code above in your browser using DataLab