<?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: EM-algorithm in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/EM-algorithm/m-p/105245#M787</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Rick. The idea is very good and helpful. The formula might be log(det(A))= 2*log(det(root(A))). If det(root(A)) is still overflow, we may need to use all eigenvalues of A to calculate the log(det(A)).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Oct 2012 15:05:54 GMT</pubDate>
    <dc:creator>renc</dc:creator>
    <dc:date>2012-10-24T15:05:54Z</dc:date>
    <item>
      <title>EM-algorithm</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/EM-algorithm/m-p/105243#M785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did an EM-algorithm for latent variable model with missing biomarkers and coviates in SAS IML. There is an overflow error in the DET of a 159X159 matrix. I have to use Log-likelihood function(LF) to control the iteration times and it includes the determinant.&lt;/P&gt;&lt;P&gt;What are the possible approaches to solve this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help in advance!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2012 13:58:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/EM-algorithm/m-p/105243#M785</guid>
      <dc:creator>renc</dc:creator>
      <dc:date>2012-10-24T13:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: EM-algorithm</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/EM-algorithm/m-p/105244#M786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The determinant is a polynomial in the entries, and is therefore known to be unstable for large matrices.&lt;/P&gt;&lt;P&gt;Are you using the determinant to find out if a matrix is singular? If so, there are better (more stable) ways to determine singularity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or does the determinant appear in the LL formula and you need to compute it explicitly? If so, compute the log-determinant (which should be stable) and exponentiate, assuming the log-det is less than CONSTANT('LOGBIG').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the matrix positive definite (a correlation or covariance matrix)?&amp;nbsp; If so, you can compute the log-det as follows:&lt;/P&gt;&lt;P&gt;Let G = root(A) be the Cholesky root of the matrix A.&lt;/P&gt;&lt;P&gt;Then log(det(A)) = log(det(G`*G)) = log(det(G`)*det(G)) = 2*log(det(G))&lt;/P&gt;&lt;P&gt;Since G is triangular, det(G) = prod(diag(G)) and therefore log(det(G))=sum(diag(G)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So your formula for log(det(A)) is 2*sum(log(diag(root(A)))).&amp;nbsp; In SAS/IML you would use the VECDIAG function to get the diagonal elements of a matrix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Rick Wicklin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2012 14:18:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/EM-algorithm/m-p/105244#M786</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-10-24T14:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: EM-algorithm</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/EM-algorithm/m-p/105245#M787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Rick. The idea is very good and helpful. The formula might be log(det(A))= 2*log(det(root(A))). If det(root(A)) is still overflow, we may need to use all eigenvalues of A to calculate the log(det(A)).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2012 15:05:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/EM-algorithm/m-p/105245#M787</guid>
      <dc:creator>renc</dc:creator>
      <dc:date>2012-10-24T15:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: EM-algorithm</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/EM-algorithm/m-p/105246#M788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're free to try it, but computing det(root(A)) is only a minor improvement over det(A). The whole point is to get rid of det(LargeMatrix).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2012 15:14:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/EM-algorithm/m-p/105246#M788</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-10-24T15:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: EM-algorithm</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/EM-algorithm/m-p/105247#M789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rats, I omitted a 'log' in the final formula, which is probably what confused you. I will edit my original post to correct it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2012 16:55:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/EM-algorithm/m-p/105247#M789</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-10-24T16:55:42Z</dc:date>
    </item>
  </channel>
</rss>

