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, [EMAIL PROTECTED]
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
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html