nodeProbabilities: Multiplies conditional probabilities along all branches of...

Description Usage Arguments Details Value Author(s) Examples

Description

This function generates the symbolic formulas representing the marginal node probabilities.

Usage

1
nodeProbabilities(F,generation)

Arguments

F

A recurrent selfing tree, as generated by function buildSelfingTree.

generation

Integer giving the highest selfing generation contained in F. Values can range from 2 to 7, e.g., the F2 generation build by default and the highest possible generation is currently the F7.

Details

Each formula represents the marginal probability of a particular node. Summing over all nodes for a particular genotype gives the probability of observing this genotype in this generation. The sum over all marginal node probabilities within a generation is 1.

Value

A list with as many elements as there were generations in F. The list elements are named "F2", "F3", etc. Each element is a vector with the symbolic formulas for the marginal probabilities of all possible nodes. The vector elements are named and the names indicate the allelic configuration of the two gametes comprising the genotype as gamete1-gamete2 (e.g., "AAB-AAA").

Author(s)

Frank Technow

Examples

1
2
3
4
5
6
## F2 and F3 genotypes
node.probs <- nodeProbabilities(buildSelfingTree(genSubtree.2M,3,"AA","BB"),3)

## must sum to 1
stopifnot(all.equal(evalProb(node.probs[["F2"]],z = 0.045),1))
stopifnot(all.equal(evalProb(node.probs[["F3"]],z = 0.045),1))

selfingTree documentation built on May 2, 2019, 8:17 a.m.