Free Access Week-  Data Engineering + BI
Data engineering and BI courses are free!
Free AI Access Week from June 2-8

cvcqv (version 1.0.0)

CoefVar: R6 Coefficient of Variation (cv)

Description

The R6 class CoefVar for the coefficient of variation (cv)

Arguments

x

An R object. Currently there are methods for numeric vectors

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

digits

integer indicating the number of decimal places to be used.

Details

Coefficient of Variation

The cv is a measure of relative dispersion representing the degree of variability relative to the mean [1]. Since cv is unitless, it is useful for comparison of variables with different units. It is also a measure of homogeneity [1].

References

[1] Albatineh, AN., Kibria, BM., Wilcox, ML., & Zogheib, B, 2014, Confidence interval estimation for the population coefficient of variation using ranked set sampling: A simulation study, Journal of Applied Statistics, 41(4), 733<U+2013>751, DOI: http://doi.org/10.1080/02664763.2013.847405

Examples

Run this code
# NOT RUN {
x <- c(
    0.2, 0.5, 1.1, 1.4, 1.8, 2.3, 2.5, 2.7, 3.5, 4.4,
    4.6, 5.4, 5.4, 5.7, 5.8, 5.9, 6.0, 6.6, 7.1, 7.9
)
CoefVar$new(x)$est()
cv_x <- CoefVar$new(x, digits = 2)
cv_x$est()
cv_x$est_corr()
R6::is.R6(cv_x)
# }

Run the code above in your browser using DataLab