<?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: Summary over time in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Summary-over-time/m-p/696610#M212805</link>
    <description>&lt;P&gt;An equivalent example to my data would be where someone lives at different points of time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;id&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var4&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Ajax&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Ajax&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Ajax&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Brampton&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Regina&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Navan&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Navan&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Navan&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;</description>
    <pubDate>Wed, 04 Nov 2020 17:51:21 GMT</pubDate>
    <dc:creator>ms400000</dc:creator>
    <dc:date>2020-11-04T17:51:21Z</dc:date>
    <item>
      <title>Summary over time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-over-time/m-p/696606#M212803</link>
      <description>&lt;P&gt;I am trying to run a frequency summary for 4 categorical variables that change over time. They have the same possible categories but the freq could change depending on the variable. Is it possible to get a count all in one table so I can easily see how a category changed between them? They have about 600 categories so I don't want a crosstab of all the different combinations. Some categories may go to or from N=0 between var1 and var4. I looked at proc tabulate but I don't think it's quite what I want. Possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;&lt;SPAN style="font-family: inherit;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var1&lt;SPAN style="font-family: inherit;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;var2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var4&lt;SPAN style="font-family: inherit;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;cat1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; N&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;N&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;N&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; N&lt;/P&gt;&lt;P&gt;cat2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; N&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;cat600&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;N&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 17:40:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-over-time/m-p/696606#M212803</guid>
      <dc:creator>ms400000</dc:creator>
      <dc:date>2020-11-04T17:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: Summary over time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-over-time/m-p/696608#M212804</link>
      <description>&lt;P&gt;Show us a portion of the original data.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;You talk about time, but you don't show a time variable? Also, frequency of what?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 17:42:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-over-time/m-p/696608#M212804</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-11-04T17:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Summary over time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-over-time/m-p/696610#M212805</link>
      <description>&lt;P&gt;An equivalent example to my data would be where someone lives at different points of time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;id&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var4&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Ajax&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Ajax&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Ajax&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Brampton&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Regina&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Navan&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Navan&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Navan&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 17:51:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-over-time/m-p/696610#M212805</guid>
      <dc:creator>ms400000</dc:creator>
      <dc:date>2020-11-04T17:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Summary over time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-over-time/m-p/696613#M212806</link>
      <description>&lt;P&gt;And I would like the number of individuals in each city (a single row is a single individual)&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 17:53:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-over-time/m-p/696613#M212806</guid>
      <dc:creator>ms400000</dc:creator>
      <dc:date>2020-11-04T17:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: Summary over time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-over-time/m-p/696614#M212807</link>
      <description>&lt;P&gt;I'm afraid that there's still a disconnect here between your original problem statement and the data you show.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do you compute the value of N in your desired output as shown in your original problem statement? N is a single number, I don't see where it comes from given the data you just showed. Please explain the logic of going from the input data you showed to the output table you showed.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 17:55:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-over-time/m-p/696614#M212807</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-11-04T17:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Summary over time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-over-time/m-p/696618#M212809</link>
      <description>&lt;P&gt;Sorry, cat1 - cat600 would be the different cities that are in my dataset. In var1 there were N1 people in Ajax, N2 people in Regina etc. Essentially I want a one way freq for each of var1 to var4 but in a single table and aligned when there may not be counts for all cities in all variables.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 17:59:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-over-time/m-p/696618#M212809</guid>
      <dc:creator>ms400000</dc:creator>
      <dc:date>2020-11-04T17:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: Summary over time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-over-time/m-p/696625#M212812</link>
      <description>&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC FREQ will compute the frequencies of each city at each point in time. From there, you'd probably want to merge the outputs into a single data set, merged by city, and then do a PROC PRINT.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 18:20:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-over-time/m-p/696625#M212812</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-11-04T18:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Summary over time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-over-time/m-p/696636#M212815</link>
      <description>&lt;P&gt;Instead of pulling one detail after another please provide a small example data set, likely only 5 to 10 variables and a few values, small enough that you can show us the desired result for the example data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am thinking that this may be wanting a transpose and then use the name of the variables as a report variable such as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have;
   input var1 var2 var3 var4;
datalines;
12  13 12 5
5   5  6  12
3  12  12 8
;

data trans;
   set have;
   array v var1-var4;
   do i=1 to dim(v);
      name = vname(v[i]);
      cat  = v[i];
      output;
   end;
   keep name cat;
run;

proc tabulate data=trans;
   class name cat;
   table cat, name*n=' '
        misstext=' ';
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Nov 2020 18:42:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-over-time/m-p/696636#M212815</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-11-04T18:42:05Z</dc:date>
    </item>
  </channel>
</rss>

