calc_EG_Var: Function to calculate the variance of conditional expected...

Description Usage Arguments Value

Description

This is the variance for the simplified function calc_EG. It used the formula var(X)=E(X^2)-E(X)^2, where E(X) is the same as the result of calc_EG.

Usage

1
calc_EG_Var(M, p, rdv)

Arguments

M

genotype likelihoods P(D_{ij}|G=AA, Aa\ or\ aa) for one locus, matrix of dimension number of samples by 3 (double);

p

genotype frequencies P(G=AA, Aa\ or\ aa) (double); output from function calc_EM.

rdv

read depth (vector of integers) for all samples

Value

the variance of E(P(G_{ij}|D_{ij})).


Struglab/RVS documentation built on May 9, 2019, 3:11 p.m.