<?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 do I get a p-value when dong proc means? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-a-p-value-when-dong-proc-means/m-p/877963#M38975</link>
    <description>&lt;P&gt;First step is to give your variables actual variable names.&amp;nbsp; So "total % unmet needs" might be UNMET (or whatever name is clear enough to understand and short enough to actually type into code).&amp;nbsp; "&lt;SPAN&gt;Spousal Status" could perhaps just be&amp;nbsp;Spousal_Status.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To compare the means of two groups use PROC TTEST.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc ttest data=have;
  class Spousal_Status;
  var UNMET ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 28 May 2023 19:42:38 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2023-05-28T19:42:38Z</dc:date>
    <item>
      <title>How do I get a p-value when dong proc means?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-a-p-value-when-dong-proc-means/m-p/877932#M38972</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My IV's are:&lt;/P&gt;&lt;P&gt;Spousal Status (0=spousal, 1=non-spousal)&lt;/P&gt;&lt;P&gt;Race (0=African American/Black, 1=White)&lt;/P&gt;&lt;P&gt;Gender (1=female, 0=male)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The DV is total % unmet needs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Conducted proc means to get the mean and SD of the total % unmet needs for the following:&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Female&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Male&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;African American/Black&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;White&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Spousal&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Non-Spousal&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Spousal Male&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Non-Spousal Male&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Spousal Female&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Non-Spousal Female&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Spousal African American/Black&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Non-Spousal African American/Black&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Spousal White&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Non-Spousal White&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Spousal male White&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Non-spousal male White&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Spousal male AA/B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Non-Spousal male AA/B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Spousal female White&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Non-spousal female White&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Spousal female AA/B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Non-spousal female AA/B&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is an example of one of the proc means:&lt;/P&gt;&lt;P&gt;Title "Non-Spousal Female Black";&lt;BR /&gt;proc means data = final.data N MEAN STDDEV;&lt;BR /&gt;var per_jhdcna_unmet_cg;&lt;BR /&gt;where spousalstatus = 1 and cg_sex = 1 and race_dich_cp = 0;&lt;BR /&gt;Run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I want to find the p-value for the following groupings:&lt;/P&gt;&lt;P&gt;Gender (male/female)&lt;/P&gt;&lt;P&gt;Race (AA/B, W)&lt;/P&gt;&lt;P&gt;Spousal Status (spousal/non-spousal)&lt;/P&gt;&lt;P&gt;Spousal Status by Gender&lt;/P&gt;&lt;P&gt;Spousal Status by Race&lt;/P&gt;&lt;P&gt;Spousal Status by Gender by Race&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a test I can do to capture the M, SD, and a p-value?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm a beginner, so I don't mind doing more steps if it is less complicated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 28 May 2023 15:37:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-a-p-value-when-dong-proc-means/m-p/877932#M38972</guid>
      <dc:creator>gtucke1</dc:creator>
      <dc:date>2023-05-28T15:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get a p-value when dong proc means?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-a-p-value-when-dong-proc-means/m-p/877937#M38973</link>
      <description>&lt;P&gt;p-value for test of what hypothesis? What are you comparing ... means or standard deviations or something else?&lt;/P&gt;</description>
      <pubDate>Sun, 28 May 2023 15:50:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-a-p-value-when-dong-proc-means/m-p/877937#M38973</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-05-28T15:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get a p-value when dong proc means?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-a-p-value-when-dong-proc-means/m-p/877942#M38974</link>
      <description>&lt;P&gt;I'm comparing the means to determine whether male/female, non-spousal/spousal, etc. has the higher mean % of unmet needs.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 28 May 2023 17:25:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-a-p-value-when-dong-proc-means/m-p/877942#M38974</guid>
      <dc:creator>gtucke1</dc:creator>
      <dc:date>2023-05-28T17:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get a p-value when dong proc means?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-a-p-value-when-dong-proc-means/m-p/877963#M38975</link>
      <description>&lt;P&gt;First step is to give your variables actual variable names.&amp;nbsp; So "total % unmet needs" might be UNMET (or whatever name is clear enough to understand and short enough to actually type into code).&amp;nbsp; "&lt;SPAN&gt;Spousal Status" could perhaps just be&amp;nbsp;Spousal_Status.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To compare the means of two groups use PROC TTEST.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc ttest data=have;
  class Spousal_Status;
  var UNMET ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 28 May 2023 19:42:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-a-p-value-when-dong-proc-means/m-p/877963#M38975</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-05-28T19:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get a p-value when dong proc means?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-a-p-value-when-dong-proc-means/m-p/877973#M38976</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/414915"&gt;@gtucke1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I'm comparing the means to determine whether male/female, non-spousal/spousal, etc. has the higher mean % of unmet needs.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Normally, hypothesis tests compare if the mean of male and the mean of the female are equal, and standard hypothesis tests do &lt;FONT color="#FF0000"&gt;not&lt;/FONT&gt; test which has the higher mean. A minor detail perhaps, but on the other hand maybe the standard hypothesis tests are not what you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In addition, you don't say what your sample size is, how many males and how many females. If the number is small (say &amp;lt;15 each), you might want to use PROC NPAR1WAY instead of PROC TTEST. If the distribution is terribly non-normal (percents being constrained between 0 and 100 inclusive), you might need even more samples in each category.&lt;/P&gt;</description>
      <pubDate>Sun, 28 May 2023 21:26:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-a-p-value-when-dong-proc-means/m-p/877973#M38976</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-05-28T21:26:36Z</dc:date>
    </item>
  </channel>
</rss>

