simLR: Simulate LRRR

View source: R/simLR.R

simLRR Documentation

Simulate LRRR

Description

The ratio Z = LR(M,p)/LR(R,p) is simulated where M is a list of mutation matrices and R a reversed version

Usage

simLR(M, R, ped1 = nuclearPed(1), ids = c(1, 3), nsim = 2, seed = NULL)

Arguments

M

List of mutation matrices, one for each marker.

R

List of reversed mutation matrices, one for each marker.

ped1

A ped object.

ids

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

nsim

Integer.

seed

Integer.

Details

If R == NULL, mutation matrices are reversed.

Value

LRR

Author(s)

Thore Egeland.

See Also

[makeReversible()].

Examples


p = c("1" = 0.1, "2" = 0.9)
M = list(mutationMatrix("equal", rate = 0.001, afreq = p),
         mutationMatrix("equal", rate = 0.001, afreq = p))
mN = c("L1", "L2")
markerNames = mN; method = "PM"; ped1 = nuclearPed(1); ids = c(1,3); nsim = 2; seed = 17
res = simLRR(M, markerNames = mN, nsim = 100, seed = 177)
simLRR(M, markerNames = mN, nsim = 10, seed = 177)
res = simLRR(M[[1]], markerNames = mN[1], nsim = 10, seed = 177)
## Not run: 
M = lapply(NorwegianFrequencies, function(x){
  mat = mutationMatrix("stepwise",
  alleles = names(x),
  rate = 0.001, 
  rate2 = 1e-05,
  range = 0.1,
  afreq = x)
  mat
})
simLRR(M, markerNames = mN, nsim = 10, seed = 177)

## End(Not run)

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