Formula: g(x) = (x_1 x_2 ... x_D)^(1/D) = exp( (1/D) sum_j log x_j )
References
Aitchison (1986), The Statistical Analysis of Compositional Data, Chapter 4, where g(x) is the normalising constant of the centred log-ratio transform.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Compgeo(V)
#> $geomean
#> [1] 3.764351
#>
#> $log_geomean
#> [1] 1.325575
#>
#> $D
#> [1] 8
#>
#> $method
#> [1] "Geometric mean of a composition"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
