calculate a volume from eigenvalues in R
I'm trying to write a bit of code that will allow for me to simply generate the volume of a sphere from 6 generated eigen values.
So I have the data:
PCoA1 PCoA2 PCoA3 PCoA4 PCoA5 PCoA6
3.2601 0.5313 0.1950 0.1174 0.0688 0.0494
And wou开发者_如何学Cld like to convert to a volume. I'm assuming that all values have equal weighting. Is this possible in R?
Thanks
The notation would be easier in math.SE
Wikipedia says that the n-volume of a n-ball of radius R is: π^(n/2) × R^n / Γ(n/2 + 1).
For n=6 this hypervolume is π^3 × R^6 / 6.
In your case of a hyperellipsoid I would expect to replace R^6 with the product of your six eigenvalues, taking them as semiaxes of the hyperellipsoid.
精彩评论