Learn R Programming

L1pack (version 0.52)

spatial.median: Computation of the generalized spatial median

Description

Computation of the generalized spatial median estimator as defined by Rao (1988).

Usage

spatial.median(x, data, subset, na.action, tol = 1e-6, maxiter = 200)

Value

A list with class 'spatial.median' containing the following components:

call

a list containing an image of the spatial.median call that produced the object.

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.

Arguments

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 model.frame), used only if x is a formula. By default the variables are taken from environment(formula).

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.

Details

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).

References

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.

See Also

cov, LaplaceFit

Examples

Run this code
z <- spatial.median(stack.x)
z

Run the code above in your browser using DataLab