R/cv.R

Defines functions cv

Documented in cv

cv <- function(C.of.V=NULL, mean=NULL, sd=NULL, N=NULL, unbiased=FALSE)
{

if(!is.null(mean) & !is.null(sd))
{
k <- sd/mean
if(!is.null(C.of.V)) stop("Since \'mean\' and \'sd\' were specified, do not specify \'C.of.V\'.")
}

if(unbiased==TRUE)
{    if (!is.null(C.of.V))
    k <- C.of.V* (1+1/(4*N))
    if (is.null(C.of.V))
    k <- k*(1+1/(4*N))
}

return(k)
}

Try the MBESS package in your browser

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

MBESS documentation built on Oct. 26, 2023, 9:07 a.m.