
Last chance! 50% off unlimited learning
Sale ends in
Compute the sample projected or geometric median.
# S3 method for SO3
median(
x,
na.rm = FALSE,
type = "projected",
epsilon = 1e-05,
maxIter = 2000,
...
)# S3 method for Q4
median(
x,
na.rm = FALSE,
type = "projected",
epsilon = 1e-05,
maxIter = 2000,
...
)
a logical value indicating whether NA values should be stripped before the computation proceeds.
string indicating "projected" or "geometric" type mean estimator.
stopping rule.
maximum number of iterations allowed before returning most recent estimate.
additional arguments.
Estimate of the projected or geometric median in the same parametrization.
The median-type estimators are defined as
hartley11 stanfill2013
# NOT RUN {
Rs <- ruars(20, rvmises, kappa = 0.01)
# Projected median
median(Rs)
# Geometric median
median(Rs, type = "geometric")
# Bias of the projected median
rot.dist(median(Rs))
# Bias of the geometric median
rot.dist(median(Rs, type = "geometric"))
Qs <- as.Q4(Rs)
# Projected median
median(Qs)
# Geometric median
median(Qs, type = "geometric")
# Bias of the projected median
rot.dist(median(Qs))
# Bias of the geometric median
rot.dist(median(Qs, type = "geometric"))
# }
Run the code above in your browser using DataLab