update_marriage_posteriors_in_place: Calculate/update one row of a marriage Posterior matrix IN...

Description Usage Arguments Value

Description

The intended use of this is to update the marriage posteriors after an individual has been moved from one sibship to another. So, for example, if you moved an individual from sibship 40 to sibship 291 (as subscripted in R) then you would want to run this with bz_idx equal to the column of sibship 39, and then run it again with it equal to the column of 290, after you had updated the LMMFS for each of those.

Usage

1
update_marriage_posteriors_in_place(ML, MP, Pri, NGS, bz_idx)

Arguments

ML

the marriage likelihoods matrix

MP

the marriage posteriors matrix that is to be updated

Pri

the joint prior probbabilities of the parent pair

NGS

Number of genotypic states. For pairs of parents, for example, this will be 9.

bz_idx

An integer vector holding the BASE-0 index of the columns of MP that needs updating. Note that this is not the index of the sibhip, but rather the column that sibship occupies in MP. That will be something like FSL[Indiv]$LMMI_Idx that

Value

This returns the value of the index of the last marriage that it updated. It does this so I can check some things. It modifies MP in place via call by reference. Our goal here is to make updates without copying a lot of memory.


eriqande/fullsniplings documentation built on May 16, 2019, 8:45 a.m.