[R] Coefficient of Variance (log values) !

Peter Dalgaard p.dalgaard at biostat.ku.dk
Wed Nov 30 17:38:09 CET 2005


Sharon Anbu <sharonanandhi at gmail.com> writes:

> Hi,
> 
> I am calculating coefficient of variance (CV) for my ELISA's data. For
> normal values, I use the standard formula CV = SD/Mean * 100.  Now, I
> would like to calculate CV  for log values.  Can any one please
> suggest me, how I can do this in R?

It usually makes best sense just to quote the SD of the natural-log
transformed values as a coefficient of variation (sic). The precise
formula is that in the lognormal distribution,

CV = sqrt(exp(SD^2)-1)

where CV is the coefficient of X and SD is the standard deviation of
log(x). If you look at

curve(sqrt(exp(x^2)-1))
abline(0,1)

you'll see that the deviation is quite small for x < 0.3 or so.

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907




More information about the R-help mailing list