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

Description Usage Arguments Value

Description

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

Usage

1

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.