npcv | R Documentation |
Calculates a non-parametric version of the coefficient of
variation where the standard deviation is replaced by the median
absolute deviations (see mad
for details) and
divided by the absolute value of the mean.
Note that the mad
of a single value is 0 (as opposed to
NA
for the standard deviation, see example below).
npcv(x, na.rm = TRUE)
x |
A |
na.rm |
A |
A numeric
.
Laurent Gatto
set.seed(1)
npcv(rnorm(10))
replicate(10, npcv(rnorm(10)))
npcv(1)
mad(1)
sd(1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.