R/cloglog.R

Defines functions cloglog invcloglog

Documented in cloglog invcloglog

# Function to calculate the complimentary log log (cloglog) function
#   and its inverse.

cloglog <-
function(p) {
	if(any(p < 0 | p > 1))
		stop("p must be between 0 and 1")
	log(-log(1-p))
}


invcloglog <-
function(x)  { 1 - exp(-exp(x)) }
mikemeredith/MMmisc documentation built on Nov. 8, 2019, 11:34 p.m.