<?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: Frequency Table Issue with Multiple variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Frequency-Table-Issue-with-Multiple-variables/m-p/351042#M81679</link>
    <description>&lt;P&gt;Thank you. I've corrected per your guidance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I still don't think I have it quite right. I need to find the average dollar spent for the females in 50's. I'm pretty sure I need to have one mean rather than several.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=profoot.pro_football_segments;
    format age age.;
	class dollars_spent age_bracket gender;
	var dollars_spent;
	where age_bracket='50s' and gender='Female';
run; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and I get:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8385i3901E13344B48C85/image-size/original?v=1.0&amp;amp;px=-1" alt="Capture.JPG" title="Capture.JPG" border="0" /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Apr 2017 20:33:00 GMT</pubDate>
    <dc:creator>bldudley</dc:creator>
    <dc:date>2017-04-18T20:33:00Z</dc:date>
    <item>
      <title>Frequency Table Issue with Multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Frequency-Table-Issue-with-Multiple-variables/m-p/351031#M81674</link>
      <description>&lt;P&gt;Hello, again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to help, pretty please.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this data (screenshot only showing a portion):&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8381i0AFB7DD49971DB2A/image-size/original?v=1.0&amp;amp;px=-1" alt="Capture.JPG" title="Capture.JPG" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I need to find out: &lt;SPAN style="font-size: 8.0pt; line-height: 115%; border: none windowtext 1.0pt; padding: 0in;"&gt;What was the average (mean) dollar spent of females in the 50-59 Age Group?&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.0pt; line-height: 115%;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So my code is written as follows:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=profoot.pro_football_segments;
    format age age.;
	class dollars_spent age_bracket gender;
	where age_bracket='50s' and gender='female';
run; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But my log indicates this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 61         
 62         proc means data=profoot.pro_football_segments;
 63             format age age.;
 64         class dollars_spent age_bracket gender;
 65         where age_bracket='50s' and gender='female';
 66         run;
 
 NOTE: No observations were selected from data set PROFOOT.PRO_FOOTBALL_SEGMENTS.
 NOTE: There were 0 observations read from the data set PROFOOT.PRO_FOOTBALL_SEGMENTS.
       WHERE (age_bracket='50s') and (gender='female');
 NOTE: PROCEDURE MEANS used (Total process time):
       real time           0.02 seconds
       cpu time            0.01 seconds
       
 
 67         
 68         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 81         &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What am I doing incorrect?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 20:20:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Frequency-Table-Issue-with-Multiple-variables/m-p/351031#M81674</guid>
      <dc:creator>bldudley</dc:creator>
      <dc:date>2017-04-18T20:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Frequency Table Issue with Multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Frequency-Table-Issue-with-Multiple-variables/m-p/351033#M81676</link>
      <description>&lt;P&gt;Female not female.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Case matters in character variables.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 20:22:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Frequency-Table-Issue-with-Multiple-variables/m-p/351033#M81676</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-18T20:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Frequency Table Issue with Multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Frequency-Table-Issue-with-Multiple-variables/m-p/351037#M81677</link>
      <description>&lt;P&gt;Where is case sensitive&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;gender='Female' not gender='female' if I read your example data (that picture has text that is way too small to read easily) correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dollars_spent should be on a VAR statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Var dollars_spent;&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;</description>
      <pubDate>Tue, 18 Apr 2017 20:27:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Frequency-Table-Issue-with-Multiple-variables/m-p/351037#M81677</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-04-18T20:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: Frequency Table Issue with Multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Frequency-Table-Issue-with-Multiple-variables/m-p/351039#M81678</link>
      <description>&lt;P&gt;Thank you so much. I would like to blame sleep deprivation on these little mistakes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One more question: Now that I fixed the capital letter and re-ran the code, I'm getting the following result.&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8384i0F1E77838D3CBB1B/image-size/original?v=1.0&amp;amp;px=-1" alt="Capture.JPG" title="Capture.JPG" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to find the mean dollar spent of females in their 50's. Do you have any guidance to change the table?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 20:27:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Frequency-Table-Issue-with-Multiple-variables/m-p/351039#M81678</guid>
      <dc:creator>bldudley</dc:creator>
      <dc:date>2017-04-18T20:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Frequency Table Issue with Multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Frequency-Table-Issue-with-Multiple-variables/m-p/351042#M81679</link>
      <description>&lt;P&gt;Thank you. I've corrected per your guidance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I still don't think I have it quite right. I need to find the average dollar spent for the females in 50's. I'm pretty sure I need to have one mean rather than several.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=profoot.pro_football_segments;
    format age age.;
	class dollars_spent age_bracket gender;
	var dollars_spent;
	where age_bracket='50s' and gender='Female';
run; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and I get:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8385i3901E13344B48C85/image-size/original?v=1.0&amp;amp;px=-1" alt="Capture.JPG" title="Capture.JPG" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 20:33:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Frequency-Table-Issue-with-Multiple-variables/m-p/351042#M81679</guid>
      <dc:creator>bldudley</dc:creator>
      <dc:date>2017-04-18T20:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: Frequency Table Issue with Multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Frequency-Table-Issue-with-Multiple-variables/m-p/351047#M81681</link>
      <description>&lt;P&gt;Although we're happy to answer question please spend some time searching as well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good references are available on Lexjansen.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You've figured out using VAR to limit the variable. To limit the statistics shown list the relevant ones in the PROC MEANS statement. You probably want the NWAY option as well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC MEANS .... Mean STD NWAY;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 20:40:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Frequency-Table-Issue-with-Multiple-variables/m-p/351047#M81681</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-18T20:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: Frequency Table Issue with Multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Frequency-Table-Issue-with-Multiple-variables/m-p/351048#M81682</link>
      <description>&lt;P&gt;&lt;SPAN class="token statement"&gt;class&lt;/SPAN&gt; &lt;FONT color="#ff00ff"&gt;&lt;STRONG&gt;dollars_spent&lt;/STRONG&gt; &lt;/FONT&gt;age_bracket gender&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="token punctuation"&gt;When you put a variable in the class statement it means to create an analysis for each level of that variable. Do not put dollars_spent on a the class statement. &lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 20:41:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Frequency-Table-Issue-with-Multiple-variables/m-p/351048#M81682</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-04-18T20:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Frequency Table Issue with Multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Frequency-Table-Issue-with-Multiple-variables/m-p/351050#M81683</link>
      <description>&lt;P&gt;Thank you very much. I appreciate your time and help.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 20:45:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Frequency-Table-Issue-with-Multiple-variables/m-p/351050#M81683</guid>
      <dc:creator>bldudley</dc:creator>
      <dc:date>2017-04-18T20:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Frequency Table Issue with Multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Frequency-Table-Issue-with-Multiple-variables/m-p/351051#M81684</link>
      <description>&lt;P&gt;Reeza,&lt;/P&gt;&lt;P&gt;Thank you. I appreciate your time. I'm only asking after trying to research and figure this out. I'm just beginning, so I appreciate everyone's help with this.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 20:46:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Frequency-Table-Issue-with-Multiple-variables/m-p/351051#M81684</guid>
      <dc:creator>bldudley</dc:creator>
      <dc:date>2017-04-18T20:46:31Z</dc:date>
    </item>
  </channel>
</rss>

