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.34  0.60  -Inf -0.11 -0.21 0
#> 2 i122_2007_M i042_2003_F      4 -0.39 -3.00 -3.00  0.29 -0.35 -0.30 0
#> 3 i122_2007_M i083_2005_M      2  0.52 -0.65 -0.13 -0.09  0.21  0.28 0