point_3d_variance: Calculate sample variance of 3D point distance from centroid

View source: R/point_3d_variance.R

point_3d_varianceR Documentation

Calculate sample variance of 3D point distance from centroid

Description

Calculates sample variance of points' distances in 3D space from their centroid. This function is normally only used indirectly through 'validate_get_twcv'.

Usage

point_3d_variance(point_matrix)

Arguments

point_matrix

An n-by-3 numerical matrix where each row corresponds to a single point in 3D space.

Value

A one-element numeric vector holding calculated variance

Details

The variance here is taken to mean the sum of variances for each dimension/axis:

\frac{\sum_{i=1}^n (x_i-x_m)^2 + (y_i-y_m)^2 + (z-z_m)^2}{n-1}

Where X/Y/Z represent one axis each, a_m represents the mean of all points' coordinates on an axis, and n represents the total number of points.

See Also

centroid_3d_sq_dist


synr documentation built on June 22, 2024, 7:25 p.m.