CV {NMcalc} | R Documentation |
Calculate coefficient of variation of data
Description
Calculate coefficient of variation of data
Usage
CV(x, log = FALSE)
Arguments
x |
The data |
log |
If TRUE, the geometric coefficient of variation is calculated. This is sqrt(exp(var(log(x))-1). |
Details
This function is intended to be used on data. For a log-normal THETA1*EXP(ETA(1)) 'Nonmem' parameter, do CV=sqrt(exp(OMEGA[1,1])-1).
Value
A numeric
Examples
set.seed(139)
x1 <- rnorm(1000,mean=5)
CV(x1)
CV(x1,log=TRUE)
x2 <- exp(x1)
CV(x2)
CV(x2,log=TRUE)
[Package NMcalc version 0.0.3 Index]