Learn R Programming

mispitools (version 1.2.0)

simLRgen: 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)

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.

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

Examples

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

Run the code above in your browser using DataLab