R/CompProbDownPower.R

CompProbDownPower <-
function (nAA, nBB, EnAB, prob, theta, vec = NULL) 
{
    pr <- prob * EnAB * (EnAB - 1)/(theta * (nAA + 1) * (nBB + 1))
    nvec <- c(vec, pr)
    if (EnAB > 3) {
        nvec <- CompProbDownPower(nAA + 1, nBB + 1, EnAB - 2, pr, theta, 
            nvec)
    }
    return(nvec)
}

Try the HardyWeinberg package in your browser

Any scripts or data that you put into this service are public.

HardyWeinberg documentation built on May 29, 2024, 6:17 a.m.