<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Covariance and Correlation in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Covariance-and-Correlation/m-p/140000#M1148</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interesting. I've never seen this behavior before. The correct behavior would be for the ROOT function to report an error in the log:&lt;/P&gt;&lt;P&gt;ERROR: (execution) Matrix should be positive definite&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I were to guess, I'd say that the exact integer values are causing a numerical problem in the ROOT function such that the ROOT function does not report the error. In the following code I perturb an element by a tiny amount and the ROOT function correctly reports that the matrix is not PD:&lt;/P&gt;&lt;P&gt;D[1] = D[1] + 1e-8;&lt;/P&gt;&lt;P&gt;G = root(D);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will enter a bug report at SAS so that someone can look into this situation further.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Jan 2015 17:49:18 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2015-01-27T17:49:18Z</dc:date>
    <item>
      <title>Covariance and Correlation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Covariance-and-Correlation/m-p/139999#M1147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am replicating Rick's Covariance / Correlation Cholesky transformation within Proc IML as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;&amp;nbsp; D = { 1 2 3,&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2 4 3,&lt;/P&gt;&lt;P&gt;&amp;nbsp; 3 3 9};&lt;/P&gt;&lt;P&gt;&amp;nbsp; X = root(D)`*root(D);&lt;/P&gt;&lt;P&gt;&amp;nbsp; print D;&lt;/P&gt;&lt;P&gt;&amp;nbsp; print X;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interestingly, X does not equal D.&amp;nbsp; I am wondering if this is due to D not being Positive Definite or, in other words, Det(D) &amp;lt;0.&amp;nbsp; The code runs without any indication of a problem.....had I not printed X, I would have never known that that Root(D)`*Root(D) would not equal D.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts on why this is the case?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 16:26:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Covariance-and-Correlation/m-p/139999#M1147</guid>
      <dc:creator>bhfield</dc:creator>
      <dc:date>2015-01-27T16:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Covariance and Correlation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Covariance-and-Correlation/m-p/140000#M1148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interesting. I've never seen this behavior before. The correct behavior would be for the ROOT function to report an error in the log:&lt;/P&gt;&lt;P&gt;ERROR: (execution) Matrix should be positive definite&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I were to guess, I'd say that the exact integer values are causing a numerical problem in the ROOT function such that the ROOT function does not report the error. In the following code I perturb an element by a tiny amount and the ROOT function correctly reports that the matrix is not PD:&lt;/P&gt;&lt;P&gt;D[1] = D[1] + 1e-8;&lt;/P&gt;&lt;P&gt;G = root(D);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will enter a bug report at SAS so that someone can look into this situation further.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 17:49:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Covariance-and-Correlation/m-p/140000#M1148</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-01-27T17:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: Covariance and Correlation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Covariance-and-Correlation/m-p/140001#M1149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dr. Wicklin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 17:54:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Covariance-and-Correlation/m-p/140001#M1149</guid>
      <dc:creator>bhfield</dc:creator>
      <dc:date>2015-01-27T17:54:02Z</dc:date>
    </item>
  </channel>
</rss>

