[Stable]

Computes the scale-adjusted coefficient of variation, acv, (Doring and Reckling, 2018) to account for the systematic dependence of \(\sigma^2\) from \(\mu\). The acv is computed as follows: \[acv = \frac{\sqrt{10^{\tilde v_i}}}{\mu_i}\times 100\] where \(\tilde v_i\) is the adjusted logarithm of the variance computed as: \[\tilde v_i = a + (b - 2)\frac{1}{n}\sum 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.

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

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.

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.

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. doi: 10.1016/j.eja.2018.06.007

Author

Tiago Olivoto tiagoolivoto@gmail.com

Examples

# \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)
#> # A tibble: 15 x 7 #> mean var log10_mean log10_var POLAR cv acv #> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 0.589 0.0064 -0.230 -2.19 -0.326 13.6 7.34 #> 2 0.617 0.0141 -0.210 -1.85 -0.00356 19.2 10.6 #> 3 0.794 0.0218 -0.100 -1.66 0.0703 18.6 11.6 #> 4 1.03 0.0318 0.0133 -1.50 0.115 17.3 12.2 #> 5 1.50 0.0314 0.177 -1.50 -0.0624 11.8 9.94 #> 6 3.86 0.0766 0.587 -1.12 -0.106 7.17 9.46 #> 7 4.70 0.062 0.672 -1.21 -0.287 5.30 7.68 #> 8 6.11 0.0822 0.786 -1.09 -0.285 4.69 7.70 #> 9 7.15 0.160 0.854 -0.795 -0.0658 5.60 9.91 #> 10 7.53 0.199 0.877 -0.702 0.00298 5.91 10.7 #> 11 1.22 0.0157 0.0874 -1.80 -0.269 10.2 7.84 #> 12 1.63 0.0593 0.213 -1.23 0.176 14.9 13.1 #> 13 2.43 0.0565 0.385 -1.25 -0.0263 9.78 10.4 #> 14 2.50 0.200 0.398 -0.700 0.509 17.9 19.2 #> 15 3.02 0.272 0.479 -0.566 0.557 17.3 20.3
# }