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

Description Usage Arguments Value Author(s) Examples

View source: R/transition_probability.R

Description

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

Usage

1
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

1
2
3
4
5
6
7
8
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 )

MarianaLag/Mlag documentation built on Feb. 13, 2020, 12:30 a.m.