R/logit.R

logit <-
function (pp) 
{
    temp.p <- remove.na(pp)
    p <- temp.p$x[1:temp.p$n]
    for (i in 1:temp.p$n) {
        if ((p[i] < 0) | (p[i] > 1)) 
            stop("The proportion must be in the range 0 to 1")
    }
    z <- log(p) - log(1 - p)
    return(z = z)
}

Try the rgr package in your browser

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

rgr documentation built on May 2, 2019, 6:09 a.m.