f1dr: Estimate Double Reduction in F1 Populations

View source: R/f1dr.R

f1drR Documentation

Estimate Double Reduction in F1 Populations

Description

Estimates double reduction in F1 populations by maximum likelihood.

Usage

f1dr(nvec, G1, G2)

Arguments

nvec

A vector containing the observed genotype counts, where nvec[[i]] is the number of individuals with genotype i-1. This should be of length ploidy+1.

G1

The dosage of parent 1. Should be an integer between 0 and ploidy.

G2

The dosage of parent 2. Should be an integer between 0 and ploidy.

Value

A list with some or all of the following elements:

alpha

A vector of numerics of length floor(ploidy / 4), the estimated double reduction rate.

llike

The final log-likelihood.

Author(s)

David Gerard

See Also

zygdist() for calculating the probability of offpring genotypes given parental genotypes and the double reduction rate.

Examples

set.seed(1)
size <- 100
qvec <- zygdist(alpha = 0.1, G1 = 2, G2 = 2, ploidy = 4)
nvec <- c(stats::rmultinom(n = 1, size = size, prob = qvec))
f1dr(nvec = nvec, G1 = 2, G2 = 2)


hwep documentation built on May 31, 2023, 9:06 p.m.