R/cv2sig.R

Defines functions cv2sig

Documented in cv2sig

#' Convert CV to Lognormal SD
#'
#' Used to convert the coefficient of variation of a
#' random variable to the lognormal standard deviation,
#' using a simple transformation.
#'
#' @param cv a numeric vector, possibly length > 1,
#'   containing the CV to convert.
#'
#' @return a numeric vector with the same length as \code{cv},
#'   the lognormal standard deviation.
#'
#' @seealso \code{\link{sig2cv}}
#'
#' @examples
#' cv2sig(cv = 0.2)
#'
#' @export

cv2sig = function(cv) {
  sqrt(log((cv^2) + 1))
}
bstaton1/StatonMisc documentation built on May 18, 2020, 12:06 a.m.