Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

LR

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

## Not run: 
data(adoption)
x = Familias2linkdat(adoption$pedigrees, adoption$datamatrix, adoption$loci)
result = LRparamlink(x, ref=2)
result33 = LRparamlink(x, ref=2, marker=c(11,33))

## End(Not run)

paramlink

Parametric Linkage and Other Pedigree Analysis in R

v1.1-2
GPL (>= 2)
Authors
Magnus Dehli Vigeland [aut, cre], Thore Egeland [ctb], Guro Doerum [ctb]
Initial release
2018-01-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.