R/qfts.R

Defines functions qfts

Documented in qfts

qfts <-
function(p, sigma=1, lambda=1, dist="norm")
{
if(!any(dist == c("norm", "logis", "cauchy", "laplace"))) 
            stop("distribution is not recognized")
if(any(p<0 | p>1)) stop("p must be between zero and one")
if(sigma<=0) stop("sigma must be positive")
G <- get(paste("p", dist, sep = ""), mode = "function")
Q <- get(paste("q", dist, sep = ""), mode = "function")
sigma*(lambda+Q(1-(1-p)*G(lambda)))
}

Try the tpn package in your browser

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

tpn documentation built on Sept. 28, 2023, 1:06 a.m.