Learn R Programming

sequoia (version 2.11.1)

GetLLRAge: LLR-age from Ageprior Matrix

Description

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

Usage

GetLLRAge(AgePriorExtra, agedif, patmat)

Value

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

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).

Examples

Run this code
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)))

Run the code above in your browser using DataLab