<?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 can I calculate the result of the sum of a column /3 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-calculate-the-result-of-the-sum-of-a-column-3/m-p/653983#M196452</link>
    <description>&lt;P&gt;Why do you divide the sum into 3 ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you want to compute the mean value of C ?&lt;/P&gt;
&lt;P&gt;If positive&amp;nbsp; - use proc means:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=a;
 class;
 var a;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 07 Jun 2020 02:40:13 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2020-06-07T02:40:13Z</dc:date>
    <item>
      <title>How can I calculate the result of the sum of a column /3</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-calculate-the-result-of-the-sum-of-a-column-3/m-p/653974#M196446</link>
      <description>How can I get a result of the sum(c)/3&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;data a;&lt;BR /&gt;&lt;BR /&gt;input c e;&lt;BR /&gt;&lt;BR /&gt;datalines;&lt;BR /&gt;&lt;BR /&gt;3 2&lt;BR /&gt;&lt;BR /&gt;4 2&lt;BR /&gt;&lt;BR /&gt;5 3;&lt;BR /&gt;Run;</description>
      <pubDate>Sun, 07 Jun 2020 00:48:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-calculate-the-result-of-the-sum-of-a-column-3/m-p/653974#M196446</guid>
      <dc:creator>Siennayun</dc:creator>
      <dc:date>2020-06-07T00:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: How can I calculate the result of the sum of a column /3</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-calculate-the-result-of-the-sum-of-a-column-3/m-p/653983#M196452</link>
      <description>&lt;P&gt;Why do you divide the sum into 3 ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you want to compute the mean value of C ?&lt;/P&gt;
&lt;P&gt;If positive&amp;nbsp; - use proc means:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=a;
 class;
 var a;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 07 Jun 2020 02:40:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-calculate-the-result-of-the-sum-of-a-column-3/m-p/653983#M196452</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-06-07T02:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: How can I calculate the result of the sum of a column /3</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-calculate-the-result-of-the-sum-of-a-column-3/m-p/653984#M196453</link>
      <description>I understand that I can use&lt;BR /&gt;proc means a sum;&lt;BR /&gt;Variable;&lt;BR /&gt;To get the sum,&lt;BR /&gt;But how can I get the Sum(c)/3 ?&lt;BR /&gt;</description>
      <pubDate>Sun, 07 Jun 2020 02:45:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-calculate-the-result-of-the-sum-of-a-column-3/m-p/653984#M196453</guid>
      <dc:creator>Siennayun</dc:creator>
      <dc:date>2020-06-07T02:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can I calculate the result of the sum of a column /3</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-calculate-the-result-of-the-sum-of-a-column-3/m-p/653987#M196454</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
	set a end=eof;
	retain cc;
	if _n_=1 then
		cc=c;
	else
		cc+c;
	if eof then
		sum_c=cc/_N_;
Run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 07 Jun 2020 03:15:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-calculate-the-result-of-the-sum-of-a-column-3/m-p/653987#M196454</guid>
      <dc:creator>ghosh</dc:creator>
      <dc:date>2020-06-07T03:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: How can I calculate the result of the sum of a column /3</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-calculate-the-result-of-the-sum-of-a-column-3/m-p/653990#M196456</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=a;
 class;
 var a;
 output out=want mean=new_var;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 07 Jun 2020 04:57:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-calculate-the-result-of-the-sum-of-a-column-3/m-p/653990#M196456</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-06-07T04:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: How can I calculate the result of the sum of a column /3</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-calculate-the-result-of-the-sum-of-a-column-3/m-p/654006#M196458</link>
      <description>&lt;PRE&gt;data a;
input c e;
datalines;
3 2
4 2
5 3
;
Run;
proc sql;
select sum(c)/count(c) as x from a;
quit;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Jun 2020 10:49:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-calculate-the-result-of-the-sum-of-a-column-3/m-p/654006#M196458</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-06-08T10:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: How can I calculate the result of the sum of a column /3</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-calculate-the-result-of-the-sum-of-a-column-3/m-p/654024#M196460</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/332532"&gt;@Siennayun&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;How can I get a result of the sum(c)/3&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;data a;&lt;BR /&gt;&lt;BR /&gt;input c e;&lt;BR /&gt;&lt;BR /&gt;datalines;&lt;BR /&gt;&lt;BR /&gt;3 2&lt;BR /&gt;&lt;BR /&gt;4 2&lt;BR /&gt;&lt;BR /&gt;5 3;&lt;BR /&gt;Run;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;please post what you expect as result. What should happen to variable e?&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jun 2020 16:03:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-calculate-the-result-of-the-sum-of-a-column-3/m-p/654024#M196460</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-06-07T16:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: How can I calculate the result of the sum of a column /3</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-calculate-the-result-of-the-sum-of-a-column-3/m-p/654052#M196468</link>
      <description>&lt;P&gt;Please show exactly how you want the output data set to appear.&lt;/P&gt;
&lt;P&gt;And do something about all of the extra blank rows in your code. Easiest to copy code from your SAS editor and paste into a code box on the forum that is opened with the &amp;lt;/&amp;gt; or "running man" icon. Anything else is likely to have the forum windows reformat text removing spaces and inserting html tags that make for ugly code.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jun 2020 18:13:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-calculate-the-result-of-the-sum-of-a-column-3/m-p/654052#M196468</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-06-07T18:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: How can I calculate the result of the sum of a column /3</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-calculate-the-result-of-the-sum-of-a-column-3/m-p/654057#M196469</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/332532"&gt;@Siennayun&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I understand that I can use&lt;BR /&gt;proc means a sum;&lt;BR /&gt;Variable;&lt;BR /&gt;To get the sum,&lt;BR /&gt;But how can I get the Sum(c)/3 ?&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Always divide the sum by 3? Or divide by 3 because there are three observations (and so you would always divide by the number of non missing values)?&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jun 2020 19:24:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-calculate-the-result-of-the-sum-of-a-column-3/m-p/654057#M196469</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-06-07T19:24:31Z</dc:date>
    </item>
  </channel>
</rss>

