R/multrnks.R

multrnks <-
function (rk, m1 = 2, m2 = 2, m = 2) 
    {
        n <- length(rk)
        pk <- rk/n
        q <- rep(0, n)
        for (l in m1:m2) {
            q <- q + (l * choose(m, l) * (pk^(l - 1)) * ((1 - pk)^(m - 
                                                                       l)))
        }
        q
}

Try the sensitivitymv package in your browser

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

sensitivitymv documentation built on May 2, 2019, 2:06 a.m.