<?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: Find mean and SD of categorical variables in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Find-mean-and-SD-of-categorical-variables/m-p/905297#M40434</link>
    <description>&lt;P&gt;I do not understand what you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It sounds like you want to count and take the mean of the counts.&lt;/P&gt;
&lt;P&gt;But you don't need to do that as the mean of the counts is just the total number of observations divided by the number of distinct values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example if you had GENDER coded as M and F there are two gender categories.&amp;nbsp; So the mean of the count of people per category is N/2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What do intend to DO with this mean?&amp;nbsp; What value would a SD add?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Nov 2023 02:19:13 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2023-11-30T02:19:13Z</dc:date>
    <item>
      <title>Find mean and SD of categorical variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Find-mean-and-SD-of-categorical-variables/m-p/793189#M32744</link>
      <description>&lt;P&gt;I have several categorical variables like gender, race, etc. where I want to find the mean of each category. For example my variable is race and race=1 means white, race=2 means Black, race=3 means Asian/PI. I want to find the mean number of people in my dataset who are members of each race, as well as the standard deviation. Would I use PROC FREQ for this or PROC MEANS?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 19:03:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Find-mean-and-SD-of-categorical-variables/m-p/793189#M32744</guid>
      <dc:creator>westbestern</dc:creator>
      <dc:date>2022-01-28T19:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: Find mean and SD of categorical variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Find-mean-and-SD-of-categorical-variables/m-p/793196#M32746</link>
      <description>&lt;P&gt;If I am understanding you properly, you run PROC FREQ first to count the number of people in each race, and create an output data set. Then you take this output data set into PROC MEANS and compute the mean and standard deviation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 19:28:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Find-mean-and-SD-of-categorical-variables/m-p/793196#M32746</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-01-28T19:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Find mean and SD of categorical variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Find-mean-and-SD-of-categorical-variables/m-p/905296#M40433</link>
      <description>&lt;P&gt;Could you please write the code for that?&lt;BR /&gt;I understand what you mean. But I can't write the code as you are doing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 01:43:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Find-mean-and-SD-of-categorical-variables/m-p/905296#M40433</guid>
      <dc:creator>samanehMA</dc:creator>
      <dc:date>2023-11-30T01:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Find mean and SD of categorical variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Find-mean-and-SD-of-categorical-variables/m-p/905297#M40434</link>
      <description>&lt;P&gt;I do not understand what you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It sounds like you want to count and take the mean of the counts.&lt;/P&gt;
&lt;P&gt;But you don't need to do that as the mean of the counts is just the total number of observations divided by the number of distinct values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example if you had GENDER coded as M and F there are two gender categories.&amp;nbsp; So the mean of the count of people per category is N/2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What do intend to DO with this mean?&amp;nbsp; What value would a SD add?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 02:19:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Find-mean-and-SD-of-categorical-variables/m-p/905297#M40434</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-11-30T02:19:13Z</dc:date>
    </item>
  </channel>
</rss>

