ld: Linkage disequilibrium

Description Usage Arguments Value Author(s) Examples

View source: R/ld.R

Description

Linkage disequilibrium for two loci with two alleles.

Usage

1
ld(N, init.par)

Arguments

N

Vector (1-D array) giving the number of individuals of each multilocus genotype. Typically this is obtained from the output of a multilocus simulation by subsetting a single deme / age class / time step. See the example.

init.par

A list of arguments necessary to initialize the simulations and obtained with the function initialize.monoecious.multilocus. It must be the same list that has been used to simulate N.

Value

Linkage disequilibrium (gametic-phase imbalance) calculated as f(A1B1) - f(A1)*f(B1), where f(A1B1) is the frequency of gamete A1B1 and f(A1) and f(B1) are the frequencies of alleles A1 and B1. Possible only for results of multilocus simulations using two loci with two alleles each.

Author(s)

Marco Andrello

Examples

1
2
3
4
5
6
7
8
9
data(MultilocusMonoecious)
N <- sim.metapopgen.monoecious.multilocus(init.par=init.par,
                                          sigma=sigma,
                                          phi_F=phi_F, phi_M=phi_M,
                                          delta.prop=delta.prop, delta.ad=delta.ad,
                                          T_max=T_max)
# Subsetting to get results from deme 1, age class 1 at time 3
N_deme1_age1_time3 <- N[,1,1,3]
ld(N_deme1_age1_time3, init.par)

MarcoAndrello/MetaPopGen-2.0 documentation built on Nov. 25, 2020, 11:20 p.m.