compareLRR: Ratio of LRs are compared for different transformations

View source: R/compareLRR.R

compareLRRR Documentation

Ratio of LRs are compared for different transformations

Description

The ratio Z = LR(M,p)/LR(R,p) is calculated one marker.

Usage

compareLRR(M, R, ped = nuclearPed(1), ids = c(1, 3), ln = FALSE)

Arguments

M

List of mutations matrices, typically not reversed

R

List of reversed mutations matrices

ped

A ped object

ids

A numeric with ID labels of one or more pedigree members.

ln

character Logical.

Details

This gies summary statistics, the complete distribution for one marker is provided by mut2::exactLRR.

Value

The smallest value (min), the expected value and standard deviation wrt the numerator and the largest value.

Author(s)

Thore Egeland.

See Also

[exactLRR()].

Examples

# Example One marker. PO case.
library(pedmut)
library(pedprobr)
ped = nuclearPed(1)
p = c("1" = 0.2, "2" = 0.8)
M = mutationMatrix("equal", afreq = p, alleles = 1:length(p), 
                   rate = 0.01)
R = makeReversible(M, method = "PM", afreq = p)
M = list(M)
names(M) = "L1"
R = list(R)
res1 = compareLRR(M, R)

M =  R = list()
M[[1]] = mutationMatrix("equal", afreq = p, alleles = 1:length(p), rate = 0.01)
M[[2]] = mutationMatrix("equal", afreq = p, alleles = 1:length(p), rate = 0.05)
R[[1]] = makeReversible(M[[1]], method = "PM", afreq = p)
R[[2]] = makeReversible(M[[2]], method = "PM", afreq = p)
names(M) = names(R) = paste0("L", 1:2)
res2 = compareLRR(M, R)
res3 = compareLRR(M, R, ln = TRUE)


thoree/mut2 documentation built on May 16, 2023, 7:56 p.m.