
Compute the sample geometric or projected mean.
# S3 method for SO3
mean(x, type = "projected", epsilon = 1e-05, maxIter = 2000, ...)# S3 method for Q4
mean(x, type = "projected", epsilon = 1e-05, maxIter = 2000, ...)
string indicating "projected" or "geometric" type mean estimator.
stopping rule for the geometric-mean.
maximum number of iterations allowed for geometric-mean.
additional arguments.
Estimate of the projected or geometric mean of the sample in the same parametrization.
This function takes a sample of 3D rotations (in matrix or quaternion form)
and returns the projected arithmetic mean denoted type
option. For a sample of
tyler1981, moakher02, manton04
# NOT RUN {
Rs <- ruars(20, rvmises, kappa = 0.01)
# Projected mean
mean(Rs)
# Same as mean(Rs)
project.SO3(colMeans(Rs))
# Geometric mean
mean(Rs, type = "geometric")
# Bias of the projected mean
rot.dist(mean(Rs))
# Bias of the geometric mean
rot.dist(mean(Rs, type = "geometric"))
# Same thing with quaternion form
Qs <- as.Q4(Rs)
mean(Qs)
mean(Qs, type = "geometric")
rot.dist(mean(Qs))
rot.dist(mean(Qs, type = "geometric"))
# }
Run the code above in your browser using DataLab