cv: Calculate the coefficient of variation (CV) of a habitual...

View source: R/cv.R

cvR Documentation

Calculate the coefficient of variation (CV) of a habitual intake distribution

Description

This function calculates the coefficient of variation (CV) of a habitual intake distribution. It handles gamma and log-normal distributions.

Usage

cv(shape = NULL, rate = NULL, meanlog = NULL, sdlog = NULL)

Arguments

shape

Shape parameter for gamma distribution

rate

Rate parameter for gamma distribution

meanlog

Mean parameter for gamma distribution

sdlog

Standard deviation parameter for gamma distribution

Value

The coefficient of variation (CV) of the distribution

Examples

cv(shape=1, rate=0.5)
cv(meanlog=3, sdlog=1)

cfree14/nutriR documentation built on Oct. 31, 2024, 6:27 p.m.