LR {paramlink} | R Documentation |
Likelihood ratios of pedigree hypotheses
Description
This function computes likelihood ratios for a given a list of pedigrees
(linkdat/singletons objects), one of which is the 'reference', with genotype
data from the same set of markers. Data exported from the 'Familias' software
can be analysed by using Familias2linkdat
prior to calling this
function.
Usage
LR(x, ref, markers)
Arguments
x |
A list of pedigrees. Each pedigree is either a single linkdat/singleton object, or a list of such objects (the latter is necessary if the pedigree is disconnected). |
ref |
A single integer, indicating the index of the reference pedigree. This is used in the denominator of each LR. |
markers |
A vector of integers, indexing which markers should be included. If NULL (the default) all markers are used. |
Value
A list with entries
LR |
Likelihood ratios |
LRperMarker |
Likelihood ratios for each marker |
likelihoodsPerSystem |
Likelihoods for each marker |
time |
user, system and elapsed time |
Author(s)
Magnus Dehli Vigeland and Thore Egeland
See Also
Examples
# Simulate genotypes for 5 tetraallelic markers for a pair of full sibs
set.seed(123)
sibs = simpleSim(nuclearPed(2), N=5, alleles=1:4, available=3:4)
# Create two alternative hypotheses and transfer the simulated genotypes to them
halfsibs = addOffspring(nuclearPed(1),father=1,noffs=1,id=4)
halfsibs = transferMarkerdata(sibs, halfsibs)
unrel = list(singleton(3), singleton(4))
unrel = transferMarkerdata(sibs, unrel)
# Compute LR with 'unrelated' as reference
LR(list(sibs, halfsibs, unrel), ref=3)