<?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: How to find the location of miss value in a matrix? in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-find-the-location-of-miss-value-in-a-matrix/m-p/157252#M1437</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I get it. Thanks a lot!&lt;/P&gt;&lt;P&gt;&amp;nbsp; Steve&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 21 Dec 2014 08:32:57 GMT</pubDate>
    <dc:creator>ShufeGuoding</dc:creator>
    <dc:date>2014-12-21T08:32:57Z</dc:date>
    <item>
      <title>How to find the location of miss value in a matrix?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-find-the-location-of-miss-value-in-a-matrix/m-p/157248#M1433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to replace missing value in a matrix A with zero and first need to find their locations in the matrix. Since function loc() treats the missing values as zero, how can I use the function to find their locations in A?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2014 07:15:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-find-the-location-of-miss-value-in-a-matrix/m-p/157248#M1433</guid>
      <dc:creator>ShufeGuoding</dc:creator>
      <dc:date>2014-12-19T07:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the location of miss value in a matrix?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-find-the-location-of-miss-value-in-a-matrix/m-p/157249#M1434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;A = {. 2 3, 4 . 6};&lt;/P&gt;&lt;P&gt;idx = loc(A=.);&lt;/P&gt;&lt;P&gt;A[idx] = 0;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2014 11:19:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-find-the-location-of-miss-value-in-a-matrix/m-p/157249#M1434</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2014-12-19T11:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the location of miss value in a matrix?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-find-the-location-of-miss-value-in-a-matrix/m-p/157250#M1435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because missing values are treated as zero, Your code seems not work properly. The problem is the same as&amp;nbsp; that I met.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Dec 2014 00:28:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-find-the-location-of-miss-value-in-a-matrix/m-p/157250#M1435</guid>
      <dc:creator>ShufeGuoding</dc:creator>
      <dc:date>2014-12-21T00:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the location of miss value in a matrix?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-find-the-location-of-miss-value-in-a-matrix/m-p/157251#M1436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works fine for me, idx identifies the missing as 1, 5. Next line replaces them to be 0's. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;A = {. 2 3, 4 . 6};&lt;/P&gt;&lt;P&gt;idx = loc(A=.);&lt;/P&gt;&lt;P&gt;print idx;&lt;/P&gt;&lt;P&gt;A[idx] = 0;&lt;/P&gt;&lt;P&gt;print a;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OUTPUT: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;SPAN class="c systemtitle" style="text-align: center; color: #112277; font-size: small; font-weight: bold;"&gt;The SAS System&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;SPAN class="c systemtitle" style="text-align: center; color: #112277; font-size: small; font-weight: bold;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE class="table" style="margin-bottom: 1em; border-style: solid; border-width: 1px 0px 0px 1px; border-color: #c1c1c1; margin-left: auto; margin-right: auto;"&gt;&lt;TBODY&gt;&lt;TR style="border-top-width: 1px; border-top-color: #c1c1c1; border-bottom-color: #c1c1c1;"&gt;&lt;TD class="r data" style="text-align: right; padding: 3px 6px; background-color: #ffffff; border-color: #c1c1c1; border-style: solid; border-width: 0px 1px 1px 0px; font-size: x-small;"&gt;1&lt;/TD&gt;&lt;TD class="r data" style="text-align: right; padding: 3px 6px; background-color: #ffffff; border-color: #c1c1c1; border-style: solid; border-width: 0px 1px 1px 0px; font-size: x-small;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;TABLE class="table" style="margin-bottom: 1em; border-style: solid; border-width: 1px 0px 0px 1px; border-color: #c1c1c1; margin-left: auto; margin-right: auto;"&gt;&lt;TBODY&gt;&lt;TR style="border-top-width: 1px; border-top-color: #c1c1c1; border-bottom-color: #c1c1c1;"&gt;&lt;TD class="r data" style="text-align: right; padding: 3px 6px; background-color: #ffffff; border-color: #c1c1c1; border-style: solid; border-width: 0px 1px 1px 0px; font-size: x-small;"&gt;0&lt;/TD&gt;&lt;TD class="r data" style="text-align: right; padding: 3px 6px; background-color: #ffffff; border-color: #c1c1c1; border-style: solid; border-width: 0px 1px 1px 0px; font-size: x-small;"&gt;2&lt;/TD&gt;&lt;TD class="r data" style="text-align: right; padding: 3px 6px; background-color: #ffffff; border-color: #c1c1c1; border-style: solid; border-width: 0px 1px 1px 0px; font-size: x-small;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border-top-width: 1px; border-top-color: #c1c1c1; border-bottom-color: #c1c1c1;"&gt;&lt;TD class="r data" style="text-align: right; padding: 3px 6px; background-color: #ffffff; border-color: #c1c1c1; border-style: solid; border-width: 0px 1px 1px 0px; font-size: x-small;"&gt;4&lt;/TD&gt;&lt;TD class="r data" style="text-align: right; padding: 3px 6px; background-color: #ffffff; border-color: #c1c1c1; border-style: solid; border-width: 0px 1px 1px 0px; font-size: x-small;"&gt;0&lt;/TD&gt;&lt;TD class="r data" style="text-align: right; padding: 3px 6px; background-color: #ffffff; border-color: #c1c1c1; border-style: solid; border-width: 0px 1px 1px 0px; font-size: x-small;"&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Dec 2014 00:37:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-find-the-location-of-miss-value-in-a-matrix/m-p/157251#M1436</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-12-21T00:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the location of miss value in a matrix?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-find-the-location-of-miss-value-in-a-matrix/m-p/157252#M1437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I get it. Thanks a lot!&lt;/P&gt;&lt;P&gt;&amp;nbsp; Steve&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Dec 2014 08:32:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-find-the-location-of-miss-value-in-a-matrix/m-p/157252#M1437</guid>
      <dc:creator>ShufeGuoding</dc:creator>
      <dc:date>2014-12-21T08:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the location of miss value in a matrix?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-find-the-location-of-miss-value-in-a-matrix/m-p/157253#M1438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As far as I know, missing values are not "treated as zero" anywhere in IML. You might be thinking of the behavior of an IF/THEN-ELSE statement, where a missing value in the IF conditional results in the condition evaluating to FALSE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Dec 2014 18:12:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-find-the-location-of-miss-value-in-a-matrix/m-p/157253#M1438</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2014-12-21T18:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the location of miss value in a matrix?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-find-the-location-of-miss-value-in-a-matrix/m-p/157254#M1439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was misleaded by the statements for Loc function in Usg/IML12.1 that read:&lt;/P&gt;&lt;P&gt;The&amp;nbsp; loc funciton finds nonzero elements of a matix. .... . Missing values treated as zeros.:smileyconfused:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2014 00:23:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-find-the-location-of-miss-value-in-a-matrix/m-p/157254#M1439</guid>
      <dc:creator>ShufeGuoding</dc:creator>
      <dc:date>2014-12-22T00:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the location of miss value in a matrix?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-find-the-location-of-miss-value-in-a-matrix/m-p/157255#M1440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see.&amp;nbsp; I interpret that phrase to mean that&lt;/P&gt;&lt;P&gt;y = loc(x);&lt;/P&gt;&lt;P&gt;will produce a matrix y such that y[i,j]=0 whenever x[i,j] is zero or missing, but I see how that phrase might be confusing. To make sure you always get the correct answer, I recommend using a logical expression as the argument to the LOC function.&amp;nbsp; For example&lt;/P&gt;&lt;P&gt;y = loc(x^=0);&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;y = loc(x&amp;gt;0);&lt;/P&gt;&lt;P&gt;etc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2014 12:40:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-find-the-location-of-miss-value-in-a-matrix/m-p/157255#M1440</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2014-12-22T12:40:09Z</dc:date>
    </item>
  </channel>
</rss>

