VAR | R Documentation |
This function computes the usual variance but divides by n, not by n-1.
VAR(x)
x |
Vector of values for which variance is computed |
To think of each of n observations weighted by 1/n this function VAR
computes squared deviations from the mean and averages them.
Thus, the sum of squared deviations is divided by n rather than by n-1, as for the unbiased estimate of the variance.
The value of the variance.
Michael Greenacre
Greenacre, M. (2018), Compositional Data Analysis in Practice, Chapman & Hall / CRC.
LR.VAR
, CLOSE
data(cups)
cups <- CLOSE(cups)
# variances using base R function var
apply(cups, 2, var)
# variances using easyCODA function VAR
apply(cups, 2, VAR)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.