[R] always about positive definite matrix

spencerg spencer.graves at prodsyse.com
Fri Feb 4 18:48:07 CET 2011


       1.  Martin Maechler's comments should be taken as replacements 
for anything I wrote where appropriate.  Any apparent conflict is a 
result of his superior knowledge.


       2.  'eigen' returns the eigenvalue decomposition assuming the 
matrix is symmetric, ignoring anything in m[upper.tri(m)].


       3.  The basic idea behind both posdefify and nearPD is to compute 
the eigenenvalues and vectors, then replace any eigenvalues that are 
small or negative with some suitable small positive number and 
reconstruct the matrix from this modified eigenvalue decomposition. 
posdefify and nearPD implement modifications of this basic idea.


       4.  I recommend in the summary you mention nearPD but not 
posdefify, because nearPD was written more recently using the results of 
research not available to the authors when posdefify was written.


MARTIN:  There is a typo in the first line of the documentation for 
"symmpart".  It currently reads, "symmpart(x) computes the symmetric 
part (x + t(x))/2 and the skew symmetric part (x - t(x))/2 of a square 
matrix x.".  It should read, "symmpart(x) computes the symmetric part (x 
+ t(x))/2 and skewpart the skew symmetric part (x - t(x))/2 of a square 
matrix x."


       Hope this helps.
       Spencer


On 2/4/2011 6:26 AM, Stefano Sofia wrote:
> Dear R-users,
> I followed with high interest the thread about positive definite matrix.
> I tracked all the messages of the discussion and I am trying to make a summary of all the correlated problems that arose from the discussion and the best solutions to overcome them.
> As far as I understood, the main problems are two: assessing the symmetry of the given matrix and dealing with eigenvalues very close to zero.
> Do I miss some important points?
>
> The functions that have been mentioned are eigen (I think in particualr the isSymmetric.matrix function), the function posdefify of the sfmisc package and the function nearPD of the Matrix package. I believe that some conversations have not been shared with the mailing list and therefore I find difficult to trace everything.
>
> I understood very well the summary in four points given by Dr.Spencer Graves (message 53 of ISSUE 30, VOL 95), and parts of the comments added by Dr.Martin Maechler (message 71 of the same issue).
> I am not able to understand the improvement given by posdefify with respect to eigen and why nearPD is even better.
>
> Any final help?
> thank you for your attention
>
> Stefano Sofia PhD
> Weather Department of Civil Protection Marche Region
>
> AVVISO IMPORTANTE: Questo messaggio di posta elettronica può contenere informazioni confidenziali, pertanto è destinato solo a persone autorizzate alla ricezione. I messaggi di posta elettronica per i client di Regione Marche possono contenere informazioni confidenziali e con privilegi legali. Se non si è il destinatario specificato, non leggere, copiare, inoltrare o archiviare questo messaggio. Se si è ricevuto questo messaggio per errore, inoltrarlo al mittente ed eliminarlo completamente dal sistema del proprio computer. Ai sensi dell’art. 6 della  DGR n. 1394/2008 si segnala che, in caso di necessità ed urgenza, la risposta al presente messaggio di posta elettronica può essere visionata da persone estranee al destinatario.
> IMPORTANT NOTICE: This e-mail message is intended to be received only by persons entitled to receive the confidential information it may contain. E-mail messages to clients of Regione Marche may contain information that is confidential and legally privileged. Please do not read, copy, forward, or store this message unless you are an intended recipient of it. If you have received this message in error, please forward it to the sender and delete it completely from your computer system.


-- 
Spencer Graves, PE, PhD
President and Chief Operating Officer
Structure Inspection and Monitoring, Inc.
751 Emerson Ct.
San José, CA 95126
ph:  408-655-4567



More information about the R-help mailing list