simLRgen: Simulate likelihoods ratio (LRs) based on genetic data: a...

View source: R/simLRgen.R

simLRgenR Documentation

Simulate likelihoods ratio (LRs) based on genetic data: a function for obtaining expected LRs under relatedness and unrelatedness kinship hypothesis.

Description

Simulate likelihoods ratio (LRs) based on genetic data: a function for obtaining expected LRs under relatedness and unrelatedness kinship hypothesis.

Usage

simLRgen(reference, missing, numsims, seed, numCores = 1)

Arguments

reference

Reference pedigree. It could be an input from read_fam() function or a pedigree built with pedtools.

missing

Missing person ID/label indicated in the pedigree.

numsims

Number of simulations performed.

seed

Select a seed for simulations. If it is defined, results will be reproducible. Suggested, seed = 123

numCores

Enables parallelization

Value

An object of class data.frame with LRs obtained for both hypothesis, Unrelated where POI is not MP or Related where POI is MP.

Examples

library(forrel)
x = linearPed(2)
plot(x)
x = setMarkers(x, locusAttributes = NorwegianFrequencies[1:5])
x = profileSim(x, N = 1, ids = 2)
datasim = simLRgen(x, missing = 5, 10, 123)

mispitools documentation built on Sept. 8, 2023, 6:13 p.m.