<?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: Proc Mean Statement in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Mean-Statement/m-p/275494#M58569</link>
    <description>&lt;P&gt;Day is not missing for any observations. For a and b variables, there are no missing values.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jun 2016 18:21:19 GMT</pubDate>
    <dc:creator>llt34c</dc:creator>
    <dc:date>2016-06-06T18:21:19Z</dc:date>
    <item>
      <title>Proc Mean Statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Mean-Statement/m-p/275452#M58562</link>
      <description>&lt;P&gt;I have a data set I am trying to get averages (of two difference variables) for by day. I have been succesfful in the past with the below code but after adding some more variables and merging more data, I am not getting averages for every day. It does it for some but not for all. It appears that on days when I am missing values for that variable, and thus the mean should be ".", it is leaving them separate. What can i do?&amp;nbsp; Below is my code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=sows;by a b c d e;
Run;
proc means Noprint data=example;
by a b c d e;
Var x y;
Output Out=Totals
MEAN (x y) = xavrg yavrg;
Run;
Proc print data=Totals;
run;
data example; set Totals (keep=a b c d e xavrg yavrg);
Proc Print data=example;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2016 16:53:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Mean-Statement/m-p/275452#M58562</guid>
      <dc:creator>llt34c</dc:creator>
      <dc:date>2016-06-06T16:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Mean Statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Mean-Statement/m-p/275463#M58564</link>
      <description>&lt;P&gt;Are you expecting to get a missing result because some but not all of an analysis variable is missing for some values of your date variable?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure what you may mean by "leaving them separate". It would help to have a small input data set (in the form of a data step please) and the output that shows what you mean.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And does this generate output that might be what your are looking for in the final print:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data=example;
   class a b c d e;
   var x y;
   tables a*b*c*d*e,
          (x y)*mean;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Jun 2016 17:03:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Mean-Statement/m-p/275463#M58564</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-06-06T17:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Mean Statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Mean-Statement/m-p/275488#M58567</link>
      <description>&lt;P&gt;The proc tabulate did not work because the data set is too large. Leaving them separate as in, it is not taking an average and is providing me with more than one value for that day. This is happening when the x variable has missing values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My data set is imported in. There are 37 variables and 157696 observations. I am missing observations for many variables and a period is in those cells.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached some data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2016 18:08:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Mean-Statement/m-p/275488#M58567</guid>
      <dc:creator>llt34c</dc:creator>
      <dc:date>2016-06-06T18:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Mean Statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Mean-Statement/m-p/275492#M58568</link>
      <description>&lt;P&gt;Are you trying to say that DAY is one of the five variables that you called A B C D E?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If DAY is missing, how is SAS supposed to know what DAY it should be?&amp;nbsp; You will have to fix that first, if you want the values to appear in order by DAY.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2016 18:18:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Mean-Statement/m-p/275492#M58568</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-06-06T18:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Mean Statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Mean-Statement/m-p/275494#M58569</link>
      <description>&lt;P&gt;Day is not missing for any observations. For a and b variables, there are no missing values.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2016 18:21:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Mean-Statement/m-p/275494#M58569</guid>
      <dc:creator>llt34c</dc:creator>
      <dc:date>2016-06-06T18:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Mean Statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Mean-Statement/m-p/275504#M58570</link>
      <description>&lt;P&gt;Which is your day variable?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What generated the "output"?&lt;/P&gt;
&lt;P&gt;And please describe, by variable and row what is wrong.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The file size had nothing to do with tabulate not working. Missing values for class variables is another story.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What role do the other variables besides the "day" variable play? If you want a summary by day then any other By or Class variable that has more than one value for a given day will generate a level of output. So do the summary by the day variable only.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2016 19:37:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Mean-Statement/m-p/275504#M58570</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-06-06T19:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Mean Statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Mean-Statement/m-p/275507#M58571</link>
      <description>&lt;P&gt;It sounds like we have narrowed this down a little bit.&amp;nbsp; DAY is either A or B, but we can't tell which one.&amp;nbsp; Maybe you could tell us.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would also help if you would show a small piece of the PROC PRINT output that illustrates the problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe both of your analysis variables are always missing on some days.&amp;nbsp; Is that a possibility?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2016 19:46:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Mean-Statement/m-p/275507#M58571</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-06-06T19:46:48Z</dc:date>
    </item>
  </channel>
</rss>

