<?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 create links of individuals scores in multidimensional array. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Linking-scores-made-on-same-account-multidimensional-array/m-p/547303#M151637</link>
    <description>&lt;P&gt;I edited my original post.&amp;nbsp; please let me know if it further clarifies what I am searching for.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 29 Mar 2019 18:38:42 GMT</pubDate>
    <dc:creator>smend</dc:creator>
    <dc:date>2019-03-29T18:38:42Z</dc:date>
    <item>
      <title>Linking scores made on same account multidimensional array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Linking-scores-made-on-same-account-multidimensional-array/m-p/547183#M151579</link>
      <description>&lt;P&gt;I am trying to figure out how many accounts this individual created to play games from 2013 to 2019. &amp;nbsp;&amp;nbsp;Also, I am trying to link all the scores that were played in the same account.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The score array indicates the scores in the year 2013 to 2019.&amp;nbsp; A score of (-1) indicates no scores were recorded in that year.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Array score {4, 10}&amp;nbsp; &amp;nbsp; &amp;nbsp; score_2013_1-score_2013_3 score_2015_1-score_2015_3&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;score_2017_1-score_2017_3 score_2019_1-score_2019_3;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The rank array indicates the rank of the scores (lowest score is 1) in the year 2013 to 2019. A rank (-1) value also indicates no score and no ranking.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Array rank{4, 3} &amp;nbsp;&amp;nbsp;&amp;nbsp;rank_2013_1-rank_2013_3 rank_2015_1-rank_2015_3&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rank_2017_1-rank_2017_3 rank_2019_1-rank_2019_3;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The prevrank array is used to the link the rank of current year to the previous year.&amp;nbsp; The prevrank rank greater than 0 indicates the rank of the player scored in the previous year on the same account.&amp;nbsp; If the score and the rank are both greater than 0 and the prevrank is (-1), then this score was recorded on a new account that the individual created. In 2013, all the scores recorded on new accounts.&amp;nbsp; prevrank_2013_1-prevrank_2013_3 are all going to (-1).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Array prevrank{4, 3} prevrank_2013_1-prevrank_2013_3 prevrank_2015_1-prevrank_2015_3&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;prevrank_2017_1-prevrank_2017_3 prevrank_2019_1-prevrank_2019_3 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; example;&lt;/P&gt;&lt;P&gt;input&lt;/P&gt;&lt;P&gt;score_2013_1-score_2013_3 score_2015_1-score_2015_3 score_2017_1-score_2017_3 score_2019_1-score_2019_3&lt;/P&gt;&lt;P&gt;rank_2013_1-rank_2013_3 rank_2015_1-rank_2015_3 rank_2017_1-rank_2017_3 rank_2019_1-rank_2019_3&lt;/P&gt;&lt;P&gt;prevrank_2013_1-prevrank_2013_3 prevrank_2015_1-prevrank_2015_3 prevrank_2017_1-prevrank_2017_3 prevrank_2019_1-prevrank_2019_3;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;1 2 3&amp;nbsp; -1 -1 -1 11 3 12 17 18 19&lt;/P&gt;&lt;P&gt;1 2 3&amp;nbsp; -1 -1 -1 2&amp;nbsp; 1 3&amp;nbsp;&amp;nbsp; 1 2 3&lt;/P&gt;&lt;P&gt;-1 -1 -1 -1 -1 -1 3 -1 1 -1 2 3&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the example, this individual recorded three scores in 2019&lt;/P&gt;&lt;P&gt;score_2019_1= 17 and ranked rank_2019_1=1&lt;/P&gt;&lt;P&gt;score_2019_2=18 and ranked rank_2019_2=2&lt;/P&gt;&lt;P&gt;score_2019_3=19 and ranked rank_2019_3=3.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Linking:&lt;/P&gt;&lt;P&gt;prevrank_2019_1=-1, which indicates the score was recorded on a new account that the individual created in 2019.&lt;/P&gt;&lt;P&gt;prevrank_2019_2= 2, indicates that this was scored on an account which ranked 2nd in the previous year.&lt;/P&gt;&lt;P&gt;prevrank_2019_3= 3,&amp;nbsp; indicates that this was scored on an account which ranked 3rd in the previous year.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the score and rank are all -1 in a year, then the link would continue to the year before where all score and rank are non negatives.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to create an array which will display all the scores made on each account for this individual (the most recent score to the older score).&amp;nbsp; In the example, the player created 5 accounts from 2013 to 2019 and the scores in each account are:&lt;/P&gt;&lt;P&gt;Account1scores1-Account1scores3 (17)&lt;/P&gt;&lt;P&gt;Account2scores1-Account2scores4 (18, 11, 2)&lt;/P&gt;&lt;P&gt;Account3scores1-Account3scores2 (19, 12, 1)&lt;/P&gt;&lt;P&gt;Account4scores1-Account4scores2 (3)&lt;/P&gt;&lt;P&gt;Account5scores1-Account5scores1 (3)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; want;&lt;/P&gt;&lt;P&gt;input account1score1-account1score3 account2score1-account2score3 account3score1-account3score3 account4score1-account4score3&amp;nbsp;account5score1-account5score3;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;17 . . . . 18 11 2 . . 19 12 1 . . 3 . . . . 3 . . . .&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for you feedbacks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 18:57:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Linking-scores-made-on-same-account-multidimensional-array/m-p/547183#M151579</guid>
      <dc:creator>smend</dc:creator>
      <dc:date>2019-03-29T18:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to create links of individuals scores in multidimensional array.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Linking-scores-made-on-same-account-multidimensional-array/m-p/547195#M151580</link>
      <description>&lt;P&gt;It will be better you fill the dots(.) with numbers or use 3 values each. It will be easier to run the data step and see your specification. Your problem is not complicated but lacks numbers for the cells.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 13:46:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Linking-scores-made-on-same-account-multidimensional-array/m-p/547195#M151580</guid>
      <dc:creator>KachiM</dc:creator>
      <dc:date>2019-03-29T13:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to create links of individuals scores in multidimensional array.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Linking-scores-made-on-same-account-multidimensional-array/m-p/547216#M151592</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/255229"&gt;@smend&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I would like to link an individual scores in multidimensional array.&amp;nbsp; The array (a) is the scores of individual in each round.&amp;nbsp; There are four rounds.&amp;nbsp; The array (b) is the group that this individuals belongs to in the current round.&amp;nbsp; The array (c) is the group this individuals belonged to in the previous round. I would like to use the array (c) as the link to the previous round group and the previous round score.&amp;nbsp; The link stops when the array (c) equals -1 or less than 0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;data example;&lt;BR /&gt;input a1_1-a1_10 a2_1-a2_10 a3_1-a3_10 a4_1-a4_10&lt;BR /&gt;b1_1-b1_10 b2_1-b2_10 b3_1-b3_10 b4_1-b4_10&lt;BR /&gt;c1_1-c1_10 c2_1-c2_10 c3_1-c3_10 c4_1-c4_10;&lt;BR /&gt;datalines;&lt;BR /&gt;1 2 3 -1 -1 -1 -1 -1 -1 -1 12 11 10 -1 -1 -1 -1 -1 -1 -1 20 21 22 -1 -1 -1 -1 -1 -1 -1 30 31 32 -1 -1 -1 -1 -1 -1 -1&lt;BR /&gt;1 2 3 -1 -1 -1 -1 -1 -1 -1 3 2 1 -1 -1 -1 -1 -1 -1 -1 1 2 3 -1 -1 -1 -1 -1 -1 -1 1 2 3 -1 -1 -1 -1 -1 -1 -1&lt;BR /&gt;-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 3 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 1 -1 -1 -1 -1 -1 -1 -1 3 2 1 -1 -1 -1 -1 -1 -1 -1&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the fourth round, this individual score of 30 (a4_1) and belonged to group 1 (b4_1).&amp;nbsp; The c4_1 equals 3 suggest this person belonged to 3rd group in the previous last round.&amp;nbsp; The score of the 3rd group (b3_3) in the previous round equals 22 (a3_3).&amp;nbsp; This belonged to 1st group in the round before (c3_3).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4th round:&amp;nbsp; b4_1 equals 1.&amp;nbsp; a4_1 equals 30.&amp;nbsp;&amp;nbsp;c4_1 equals 3.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3rd round: b3_3 equals 3.&amp;nbsp; &amp;nbsp;a3_3 equals 22.&amp;nbsp; c3_3 equals 1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2nd round: b2_3 equals 1.&amp;nbsp; a2_3 equals 10.&amp;nbsp; c3_3 equals -1.&amp;nbsp; The link stops here, because c3_3 equals -1.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The link is (30, 22, 10)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The other links in the example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(32, 20)&lt;/P&gt;
&lt;P&gt;(31, 21, 11, 3)&lt;/P&gt;
&lt;P&gt;(30, 22, 10)&lt;/P&gt;
&lt;P&gt;(12, 1)&lt;/P&gt;
&lt;P&gt;(2)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WANT:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;BR /&gt;input d1_1-d1_10 d2_1-d2_10 d3_1-d3_10 d4_1-d4_10 d5_1 - d5_10;&lt;BR /&gt;datalines;&lt;BR /&gt;32 20 . . . . . . . . 31 21 11 3 . . . . . . 30 22 10 . . . . . . . 12 1 . . . . . . . . 2 . . . . . . . . . .&amp;nbsp;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if you need further clarification.&amp;nbsp; Thank you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You would likely be much better off in the long run to&amp;nbsp;have actual variables that hold information such as individual, round and score instead of what I see as a way too cumbersome wide structure. Also any solution that works for your current structure will need to be almost completely rewritten to handle 5 rounds, or more or fewer participants.&lt;/P&gt;
&lt;P&gt;If you have an actual numeric value for the round then the "previous round" can be referenced with the same personal id and round number = 1 less.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What kind of questions are you going to be answering using this data set?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And perhaps you want Proc Iml.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 14:44:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Linking-scores-made-on-same-account-multidimensional-array/m-p/547216#M151592</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-03-29T14:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to create links of individuals scores in multidimensional array.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Linking-scores-made-on-same-account-multidimensional-array/m-p/547223#M151595</link>
      <description>&lt;P&gt;I'm trying to link all the scores made on the same account the user had created from 2013 to 2019.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 18:46:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Linking-scores-made-on-same-account-multidimensional-array/m-p/547223#M151595</guid>
      <dc:creator>smend</dc:creator>
      <dc:date>2019-03-29T18:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to create links of individuals scores in multidimensional array.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Linking-scores-made-on-same-account-multidimensional-array/m-p/547247#M151608</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/255229"&gt;@smend&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I'm trying to find out how many games this individuals had played and what this individual had scored in the previous round.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the example, you can see is that this individual had played 6 games total.&amp;nbsp; Scored: (32, 20), (31, 21, 11, 3), (30, 22, 10), (12, 1), and (2).&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Actually I can't obvious see that. First, you did not explain what -1 means.&lt;/P&gt;
&lt;P&gt;Second I can't tell what is supposed to represent an individual or round. Is A B C supposed to indicate individual or round?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You really should explicitly state what each of the components of your variable names means as they are storing data in the variable name that is needed for processing.&lt;/P&gt;
&lt;P&gt;So in&lt;/P&gt;
&lt;P&gt;A1_1 what does the A represent, what does the 1,2 or 3 immediately after A represent and what does the number after the _ represent. I might guess the last is "game number" or similar, but that is guessing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And if you want to sum, calculate differences, means or such then likely instead of -1 you should be using the SAS value MISSING.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 15:59:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Linking-scores-made-on-same-account-multidimensional-array/m-p/547247#M151608</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-03-29T15:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to create links of individuals scores in multidimensional array.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Linking-scores-made-on-same-account-multidimensional-array/m-p/547255#M151612</link>
      <description>&lt;P&gt;As Ballardw said, make your problem simpler to understand. Make 3 variables instead of 10. Fill all cells. Show the output data set desired and then the rules(logic) of deriving the answer.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 16:23:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Linking-scores-made-on-same-account-multidimensional-array/m-p/547255#M151612</guid>
      <dc:creator>KachiM</dc:creator>
      <dc:date>2019-03-29T16:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to create links of individuals scores in multidimensional array.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Linking-scores-made-on-same-account-multidimensional-array/m-p/547300#M151634</link>
      <description>&lt;P&gt;I updated the post.&amp;nbsp; Let me know if it clarifies what I am trying to look for.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 18:38:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Linking-scores-made-on-same-account-multidimensional-array/m-p/547300#M151634</guid>
      <dc:creator>smend</dc:creator>
      <dc:date>2019-03-29T18:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to create links of individuals scores in multidimensional array.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Linking-scores-made-on-same-account-multidimensional-array/m-p/547303#M151637</link>
      <description>&lt;P&gt;I edited my original post.&amp;nbsp; please let me know if it further clarifies what I am searching for.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 18:38:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Linking-scores-made-on-same-account-multidimensional-array/m-p/547303#M151637</guid>
      <dc:creator>smend</dc:creator>
      <dc:date>2019-03-29T18:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Linking scores made on same account multidimensional array</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Linking-scores-made-on-same-account-multidimensional-array/m-p/547474#M151719</link>
      <description>&lt;P&gt;I have gone through your revised (with 3 cells) array specs. Carefully understood until I reached:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"I would like to create an array which will display all the scores made on each account for this individual (the most recent score to the older score).&amp;nbsp; In the example, the player created 5 accounts from 2013 to 2019 and the scores&amp;nbsp;...."&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I am unable understand 'individual', and 'account'. Is this for one individual or for several? I don't know the game and hence I could not guess anymore. Please read carefully once again the suggestions made by Ballardw.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 31 Mar 2019 08:35:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Linking-scores-made-on-same-account-multidimensional-array/m-p/547474#M151719</guid>
      <dc:creator>KachiM</dc:creator>
      <dc:date>2019-03-31T08:35:01Z</dc:date>
    </item>
  </channel>
</rss>

