<?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: Vectors and do while statement in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Vectors-and-do-while-statement/m-p/588986#M4823</link>
    <description>&lt;P&gt;What is the distribution from which you want to draw the elements of the vectors?&lt;/P&gt;
&lt;P&gt;In your program, you use integers in the set {0, 1, 2}. Is that part of the constraints? Or are any integers allowed?&lt;/P&gt;
&lt;P&gt;Are there other constraints?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Because of the constraint that the elements sum to a value S, only the first n-1 elements can be randomly generated. The last element is determined to be S - sum(first n-1 values),&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Sep 2019 10:19:19 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2019-09-16T10:19:19Z</dc:date>
    <item>
      <title>Vectors and do while statement</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Vectors-and-do-while-statement/m-p/588807#M4815</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two data sets with sizes m1 and m2, I want to keep k1 observations from the m1 and k2 observations from m2. In my program I need to create two vectors randomly with integer values (R1 and R2) to work as my censored scheme such that R1[+] + k1=m1 and R2[+]+K2=m2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My problem is that for some values (example K=8)&amp;nbsp; the code gives correct answer to R1 but not R2, for other values (K=15) none of them is correct. I am not sure where did I miss up?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sun, 15 Sep 2019 08:12:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Vectors-and-do-while-statement/m-p/588807#M4815</guid>
      <dc:creator>Salah</dc:creator>
      <dc:date>2019-09-15T08:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Vectors and do while statement</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Vectors-and-do-while-statement/m-p/588821#M4816</link>
      <description>&lt;P&gt;For each iteration, you are creating new vectors of length k for R1 and R2. However, you are computing s and s1 based on only the i_th component of that vector.&amp;nbsp; When the loop exits, R1 and R2 are whatever values they were assigned during the last iteration.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Sep 2019 11:18:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Vectors-and-do-while-statement/m-p/588821#M4816</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-09-15T11:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: Vectors and do while statement</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Vectors-and-do-while-statement/m-p/588938#M4822</link>
      <description>&lt;P&gt;Calculating the sums of R1 and R2&amp;nbsp; is not my intention. I am doing that just to make sure that the vectors are created correctly.&lt;/P&gt;&lt;P&gt;I need to creat R1 and R2 such that the sum of each of them plus the corresponding k add up to the original size of the data.&lt;/P&gt;&lt;P&gt;Is there a way to a complish that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 05:03:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Vectors-and-do-while-statement/m-p/588938#M4822</guid>
      <dc:creator>Salah</dc:creator>
      <dc:date>2019-09-16T05:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Vectors and do while statement</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Vectors-and-do-while-statement/m-p/588986#M4823</link>
      <description>&lt;P&gt;What is the distribution from which you want to draw the elements of the vectors?&lt;/P&gt;
&lt;P&gt;In your program, you use integers in the set {0, 1, 2}. Is that part of the constraints? Or are any integers allowed?&lt;/P&gt;
&lt;P&gt;Are there other constraints?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Because of the constraint that the elements sum to a value S, only the first n-1 elements can be randomly generated. The last element is determined to be S - sum(first n-1 values),&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 10:19:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Vectors-and-do-while-statement/m-p/588986#M4823</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-09-16T10:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: Vectors and do while statement</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Vectors-and-do-while-statement/m-p/589255#M4842</link>
      <description>&lt;P&gt;I am sorry for not being clear.&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am working on simulating two progressively censored data. The original data sizes are m1 and m2&amp;nbsp; &amp;nbsp;I want to observe k1 from m1 and k2 from m2 and censor the rest (m1-k1 and m2-k2 respectively).&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the algorithm for the simulation part I need to figure out how the observations will be censored from the original data. So I need to define the censoring schemes i.e. R1 and R2.&amp;nbsp;The R1 and R2 must be random. So I decided to work on them on a separate code so my code won't be long when I post it on the site.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only conditions are the elements of the vectors are integer&amp;gt;0,&amp;nbsp; R1[+]=m1-k1 and R2[+]=m2-k2. I could take for example m1=100 and k1=30 and in this case R1=J(3,1,0); R1[30]=70 or R1[1]=70 but this only covers the two extreme cases meaning what about the other cases where the values varies between 2nd,3rd ...etc. &amp;nbsp;positions.&lt;/P&gt;&lt;P&gt;I am struggling in how to do it for R1 and R2 at the same time and this is where I need the help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 06:04:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Vectors-and-do-while-statement/m-p/589255#M4842</guid>
      <dc:creator>Salah</dc:creator>
      <dc:date>2019-09-17T06:04:31Z</dc:date>
    </item>
  </channel>
</rss>

