<?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: Add a tiny random number to a variable to avoid &amp;quot;Repeated values for a point&amp;quot; in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Add-a-tiny-random-number-to-a-variable-to-avoid-quot-Repeated/m-p/109495#M30469</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you don't mind moving all your points by tiny amounts, you could do :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data want;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;call streaminit(7567);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set have;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;x = x + (rand("UNIFORM")-0.5) * 0.00001;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If, on the other hand, you want to move only duplicated points, but you know &lt;/P&gt;&lt;P&gt;that such points are consecutive in your dataset, you could do :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data want;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;call streaminit(7567);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set have; by x y notsorted;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if not first.y then x = x + (rand("UNIFORM")-0.5) * 0.00001;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Apr 2013 23:52:40 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2013-04-15T23:52:40Z</dc:date>
    <item>
      <title>Add a tiny random number to a variable to avoid "Repeated values for a point"</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Add-a-tiny-random-number-to-a-variable-to-avoid-quot-Repeated/m-p/109494#M30468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using Proc G3Grid.&amp;nbsp; Unfortunately in my data set there are violations of the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"If more than one observation in the input data set has the same values for both horizontal variables, x and y, a warning message is printed, and only the ﬁrst such point is used in the interpolation."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore, I'd like to add a teeny tiny bit of randomness to those variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For instance, if the original value is 5, I'd like to change that to 5.0000014738.&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please show the appropriate code to do this?&amp;nbsp; I'd like the changes to be "in place," as opposed to creating new variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nicholas Kormanik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 23:10:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Add-a-tiny-random-number-to-a-variable-to-avoid-quot-Repeated/m-p/109494#M30468</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2013-04-15T23:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Add a tiny random number to a variable to avoid "Repeated values for a point"</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Add-a-tiny-random-number-to-a-variable-to-avoid-quot-Repeated/m-p/109495#M30469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you don't mind moving all your points by tiny amounts, you could do :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data want;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;call streaminit(7567);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set have;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;x = x + (rand("UNIFORM")-0.5) * 0.00001;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If, on the other hand, you want to move only duplicated points, but you know &lt;/P&gt;&lt;P&gt;that such points are consecutive in your dataset, you could do :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data want;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;call streaminit(7567);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set have; by x y notsorted;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if not first.y then x = x + (rand("UNIFORM")-0.5) * 0.00001;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 23:52:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Add-a-tiny-random-number-to-a-variable-to-avoid-quot-Repeated/m-p/109495#M30469</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2013-04-15T23:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: Add a tiny random number to a variable to avoid "Repeated values for a point"</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Add-a-tiny-random-number-to-a-variable-to-avoid-quot-Repeated/m-p/109496#M30470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks PG.&amp;nbsp; Your first example would be my present case.&amp;nbsp; I have a follow-up on this.&amp;nbsp; Please advise:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I have many columns of data and not just one, and I want to do the same to each and every column, is there a way to do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there is not a shortcut way of changing more than one of the, say, 100 variables, the following is, I suppose, what I'd have to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;data want;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;call streaminit(7567);&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;set have;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;x1 = x1 + (rand("UNIFORM")-0.5) * 0.00001;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-style: inherit;"&gt;x2 = x2 + (rand("UNIFORM")-0.5) * 0.00001;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-style: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-style: inherit;"&gt;x3 = x3 + (rand("UNIFORM")-0.5) * 0.00001;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-style: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-style: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-style: inherit;"&gt;x4 = x4 + (rand("UNIFORM")-0.5) * 0.00001;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-style: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-style: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-style: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-style: inherit;"&gt;x5 = x5 + (rand("UNIFORM")-0.5) * 0.00001;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-style: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-style: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-style: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-style: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-style: inherit;"&gt;x6 = x6 + (rand("UNIFORM")-0.5) * 0.00001;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-style: inherit;"&gt;x100 = x100 + (rand("UNIFORM")-0.5) * 0.00001;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2013 00:23:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Add-a-tiny-random-number-to-a-variable-to-avoid-quot-Repeated/m-p/109496#M30470</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2013-04-17T00:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Add a tiny random number to a variable to avoid "Repeated values for a point"</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Add-a-tiny-random-number-to-a-variable-to-avoid-quot-Repeated/m-p/109497#M30471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since PG is leaving the forum indefinitely, &lt;A _jive_internal="true" href="https://communities.sas.com/people/PGStats/activity"&gt;https://communities.sas.com/people/PGStats/activity&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will answer this one for him, not necessarily as good, but hopefully workable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;data want;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;call streaminit(7567);&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;set have;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;array _x x1-x100;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; do over _x;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _x = _x + (rand("UNIFORM")-0.5) * 0.00001;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt; end;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Haikuo&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2013 01:31:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Add-a-tiny-random-number-to-a-variable-to-avoid-quot-Repeated/m-p/109497#M30471</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-04-17T01:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Add a tiny random number to a variable to avoid "Repeated values for a point"</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Add-a-tiny-random-number-to-a-variable-to-avoid-quot-Repeated/m-p/109498#M30472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;_xcellent.&amp;nbsp; I'll give it a try, Haikuo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2013 03:41:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Add-a-tiny-random-number-to-a-variable-to-avoid-quot-Repeated/m-p/109498#M30472</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2013-04-17T03:41:53Z</dc:date>
    </item>
  </channel>
</rss>

