R/pMO2.R

Defines functions pMO2

Documented in pMO2

pMO2 <-
function(q, theta=1, lower.tail=TRUE, log.p=FALSE)
{
if(theta<0) stop("theta must be less than 0")
Fy <- log(q)+log1p(-theta)-log1p(-theta*(1-q))
Fy <- ifelse(q <= 0, -Inf, Fy)
Fy <- ifelse(q >= 1, 0, Fy)
if(log.p == FALSE) Fy <- exp(Fy)
if(lower.tail==FALSE) Fy<-1-Fy
Fy
}

Try the gentransmuted package in your browser

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

gentransmuted documentation built on Aug. 8, 2025, 7:21 p.m.