DED (David George Edwards)
2006-Jan-19 11:35 UTC
[R] Minimizing mahalanobis distance to negative orthant
Hi
I have the following problem: given x (px1) and S (pXp positive definite), find
y such that y_i<=0 (i=1..p) minimizing the
mahalanobis distance (x-y)'S^{-1}(x-y).
Has anyone worked on this problem? Tips or R code would be appreciated.
David
____________________
David Edwards
Principal scientist
Biostatistics
Novo Nordisk A/S
Novo Allé
2880 Bagsvaerd
Denmark
+45 4444 8888 (phone)
This e-mail (including any attachments) is intended for the addressee(s) stated
above only and may contain confidential information protected by law. You are
hereby notified that any unauthorised reading, disclosure, copying or
distribution of this e-mail or use of information contained herein is strictly
prohibited and may violate rights to proprietary information. If you are not an
intended recipient, please return this e-mail to the sender and delete it
immediately hereafter. Thank you.
[[alternative HTML version deleted]]
Prof Brian Ripley
2006-Jan-19 12:10 UTC
[R] Minimizing mahalanobis distance to negative orthant
On Thu, 19 Jan 2006, DED (David George Edwards) wrote:> I have the following problem: given x (px1) and S (pXp positive > definite), find y such that y_i<=0 (i=1..p) minimizing the mahalanobis > distance (x-y)'S^{-1}(x-y). > > Has anyone worked on this problem? Tips or R code would be appreciated.If I read this correctly (some spaces would help) you want y such that y <= 0 and y minimizes (x-y)'Q(x-y) for a symmetric pos def Q. That is a quadratic program, so see package quadprog. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595