transition_probability: Returns transition probability for offspring given one or...

View source: R/transition_probability.R

transition_probabilityR Documentation

Returns transition probability for offspring given one or more parents.

Description

This is a quick function used in paternity testing that provides the probability of transition for a locus of any ploidy level.

Usage

transition_probability(off, mom, dad, multilocus = TRUE)

Arguments

off

A locus from the offspring

mom

A locus from one parent

dad

A locus from another parent

multilocus

A flag indicating that a single multilocus estimate of the transition probability should be passed (the default action). If FALSE, the results will be returned as a vector of individual locus values.

Value

The numeric probability of the offspring given the parents

Author(s)

Rodney J. Dyer <rjdyer@vcu.edu>

Examples

off <- locus( 1:2 )
mom <- locus( c(1,1) )
dad1 <- locus( c(2,2) )
dad2 <- locus( c(1,2) )
dad3 <- locus( c(1,1) )
transition_probability( off, mom, dad1 )
transition_probability( off, mom, dad2 )
transition_probability( off, mom, dad3 )

dyerlab/gstudio documentation built on Feb. 2, 2024, 8:24 p.m.