lrt_men_gl4: Likelihood ratio test using genotype likelihoods.

View source: R/lrt_glpknown.R

lrt_men_gl4R Documentation

Likelihood ratio test using genotype likelihoods.

Description

This will run a likelihood ratio test using the genotypes of an F1 population of tetraploids for the null of Mendelian segregation (accounting for double reduction and preferential pairing) against the alternative of segregation distortion. This is when genotype uncertainty is accounted for through genotype likelihoods.

Usage

lrt_men_gl4(
  gl,
  g1 = NULL,
  g2 = NULL,
  drbound = 1/6,
  pp = TRUE,
  dr = TRUE,
  alpha = 0,
  xi1 = 1/3,
  xi2 = 1/3
)

Arguments

gl

The genotype log-likelihoods. The rows index the individuals and the columns index the genotypes.

g1

Either parent 1's genotype, or parent 1's genotype log-likelihoods.

g2

Either parent 2's genotype, or parent 2's genotype log-likelihoods.

drbound

The upper bound on the double reduction rate.

pp

Is (partial) preferential pairing possible (TRUE) or not (FALSE)?

dr

Is double reduction possible (TRUE) or not (FALSE)?

alpha

If dr = FALSE, this is the known rate of double reduction.

xi1

If pp = FALSE, this is the known preferential pairing parameter of parent 1.

xi2

If pp = FALSE, this is the known preferential pairing parameter of parent 2.

Value

A list with the following elements

statistic

The log-likelihood ratio test statistic.

df

The degrees of freedom.

p_value

The p-value.

alpha

The estimated double reduction rate.

xi1

The estimated preferential pairing parameter of parent 1.

xi2

The estimated preferential pairing parameter of parent 2.

Unidentified parameters

When g1 = 2 or g2 = 2 (or both), the model is not identified and those estimates (alpha, xi1, and xi2) are meaningless. Do NOT interpret them.

The estimate of alpha (double reduction rate) IS identified as long as at least one parent is simplex, and no parent is duplex. However, the estimates of the double reduction rate have extremely high variance.

Author(s)

David Gerard

Examples

## null simulation
set.seed(1)
g1 <- 2
g2 <- 2
gl <- simf1gl(n = 25, g1 = g1, g2 = g2, alpha = 1/12, xi2 = 1/2)

## LRT when parent genotypes are known.
lrt_men_gl4(gl = gl, g1 = g1, g2 = g2)

## LRT when parent genotypes are not known
lrt_men_gl4(gl = gl)

## Alternative simulation
gl <- simgl(nvec = rep(5, 5))
lrt_men_gl4(gl = gl, g1 = g1, g2 = g2)


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