View source: R/spatial.median.R
spatial.median | R Documentation |
Computation of the generalized spatial median estimator as defined by Rao (1988).
spatial.median(x, data, subset, na.action, tol = 1e-6, maxiter = 200)
x |
a formula or a numeric matrix or an object that can be coerced to a numeric matrix. |
data |
an optional data frame (or similar: see |
subset |
an optional expression indicating the subset of the rows of data that should be used in the fitting process. |
na.action |
a function that indicates what should happen when the data contain NAs. |
tol |
the relative tolerance in the iterative algorithm. |
maxiter |
maximum number of iterations. The default is 200. |
An interesting fact is that the generalized spatial median estimator proposed by Rao (1988) is
the maximum likelihood estimator under the Kotz-type distribution discussed by Naik and Plungpongpun (2006).
The generalized spatial median estimators are defined as \hat{\bold{\mu}}
and \hat{\bold{\Sigma}}
which minimize
\frac{n}{2}\log|\bold{\Sigma}| + \sum\limits_{i=1}^n \sqrt{(\bold{x} - \bold{\mu})^T
\bold{\Sigma}^{-1} (\bold{x} - \bold{\mu})},
simultaneously with respect to \bold{\mu}
and \bold{\Sigma}
.
The function spatial.median
follows the iterative reweighting algorithm of Naik and Plungpongpun (2006).
A list with class 'spatial.median'
containing the following components:
call |
a list containing an image of the |
median |
final estimate of the location vector. |
Scatter |
final estimate of the scale matrix. |
logLik |
the log-likelihood at convergence. |
numIter |
the number of iterations used in the iterative algorithm. |
innerIter |
the total number of iterations used in the inner iterative algorithm. |
weights |
estimated weights corresponding to the Kotz distribution. |
distances |
estimated squared Mahalanobis distances. |
Generic function print
show the results of the fit.
Naik, D.N., Plungpongpun, K. (2006). A Kotz-type distribution for multivariate statistical inference. In: Balakrishnan, N., Sarabia, J.M., Castillo, E. (Eds) Advances in Distribution Theory, Order Statistics, and Inference. Birkhauser Boston, pp. 111-124.
Rao, C.R. (1988). Methodology based on the L1-norm in statistical inference. Sankhya, Series A 50, 289-313.
cov
, LaplaceFit
z <- spatial.median(stack.x)
z
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.