Skip to contents

Get log10-likelihood ratios for a specific age difference from matrix AgePriorExtra.

Usage

GetLLRAge(AgePriorExtra, agedif, patmat)

Arguments

AgePriorExtra

matrix in sequoia output

agedif

vector with age differences, in whole numbers. Must occur in rownames of AgePriorExtra.

patmat

numeric vector; choose maternal (1), paternal (2) relatives, or for each relationship the most-likely alternative (3).

Value

A matrix with nrow equal to the length of agedif, and 7 columns: PO-FS-HS-GP-FA-HA-U.

Examples

PairsG <- data.frame(ID1="i122_2007_M",
                     ID2 = c("i124_2007_M", "i042_2003_F", "i083_2005_M"),
                     AgeDif = c(0,4,2))
cbind(PairsG,
      GetLLRAge(SeqOUT_griffin$AgePriorExtra,
                agedif = PairsG$AgeDif, patmat=rep(2,3)))
#>           ID1         ID2 AgeDif   PO    FS    HS    GP    FA    HA U
#> 1 i122_2007_M i124_2007_M      0 -Inf  0.33  0.60  -Inf -0.12 -0.19 0
#> 2 i122_2007_M i042_2003_F      4 -Inf  -Inf  -Inf  0.32 -0.48 -0.47 0
#> 3 i122_2007_M i083_2005_M      2 0.52 -1.66 -0.13 -0.08  0.23  0.30 0