Learn R Programming

metan (version 1.19.0)

acv: Adjusted Coefficient of Variation

Description

[Stable]

Computes the scale-adjusted coefficient of variation, acv, (Doring and Reckling, 2018) to account for the systematic dependence of ^2 from . The acv is computed as follows: acv = 10^ v_i_i 100 where v_i is the adjusted logarithm of the variance computed as: v_i = a + (b - 2)1n m_i + 2m_i + e_i being a and b the coefficients of the linear regression for log_10 of the variance over the log_10 of the mean; m_i is the log_10 of the mean, and e_i is the Power Law Residuals (POLAR), i.e., the residuals for the previously described regression.

Usage

acv(mean, var, na.rm = FALSE)

Value

A tibble with the following columns

  • mean The mean values.

  • var The variance values;

  • log10_mean The base 10 logarithm of mean;

  • log10_var The base 10 logarithm of variance;

  • POLAR The Power Law Residuals;

  • cv The standard coefficient of variation;

  • acv Adjusted coefficient of variation.

Arguments

mean

A numeric vector with mean values.

var

A numeric vector with variance values.

na.rm

If FALSE, the default, missing values are removed with a warning. If TRUE, missing values are silently removed.

Author

Tiago Olivoto tiagoolivoto@gmail.com

References

Doring, T.F., and M. Reckling. 2018. Detecting global trends of cereal yield stability by adjusting the coefficient of variation. Eur. J. Agron. 99: 30-36. tools:::Rd_expr_doi("10.1016/j.eja.2018.06.007")

Examples

Run this code
# \donttest{
################# Table 1 from Doring and Reckling (2018)  ###########

# Mean values
u <- c(0.5891, 0.6169, 0.7944, 1.0310, 1.5032, 3.8610, 4.6969, 6.1148,
       7.1526, 7.5348, 1.2229, 1.6321, 2.4293, 2.5011, 3.0161)

# Variances
v <- c(0.0064, 0.0141, 0.0218, 0.0318, 0.0314, 0.0766, 0.0620, 0.0822,
       0.1605, 0.1986, 0.0157, 0.0593, 0.0565, 0.1997, 0.2715)

library(metan)
acv(u, v)
# }

Run the code above in your browser using DataLab